Skip to content

Commit

Permalink
Merge pull request #202 from syphon-org/0.1.5-cache-cleanup
Browse files Browse the repository at this point in the history
[0.1.5] Cache Migration / Cleanup
  • Loading branch information
ereio authored Dec 14, 2020
2 parents 200d94a + e3e9b84 commit 5a2c2e2
Show file tree
Hide file tree
Showing 78 changed files with 2,152 additions and 1,739 deletions.
1 change: 1 addition & 0 deletions android/app/proguard-rules.pro
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-keep class net.sqlcipher.** { *; }
88 changes: 87 additions & 1 deletion assets/cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,90 @@ if (true) {
},
);
```
```

```dart
// invite and membership events are different
// {membership: join, displayname: usbfingers, avatar_url: mxc://matrix.org/RrRcMHnqXaJshyXZpGrZloyh }
// {is_direct: true, membership: invite, displayname: ereio, avatar_url: mxc://matrix.org/JllILpqzdFAUOvrTPSkDryzW}
```

```dart
/**
* OneTimeKey Data Model
*
* https://matrix.org/docs/spec/client_server/latest#id468
* {
"failures": {},
"one_time_keys": {
"@alice:example.com": {
"JLAFKJWSCS": {
"signed_curve25519:AAAAHg": {
"key": "zKbLg+NrIjpnagy+pIY6uPL4ZwEG2v+8F9lmgsnlZzs",
"signatures": {
"@alice:example.com": {
"ed25519:JLAFKJWSCS": "FLWxXqGbwrb8SM3Y795eB6OA8bwBcoMZFXBqnTn58AYWZSqiD45tlBVcDa2L7RwdKXebW/VzDlnfVJ+9jok1Bw"
}
}
}
}
}
}
}
*/
```


```dart
/*
Opening storage path on mobile devices (main thread only)
*/
Future<dynamic> initStorageLocation() async {
var storageLocation;
try {
if (Platform.isIOS || Platform.isAndroid) {
storageLocation = await getApplicationDocumentsDirectory();
return storageLocation.path;
}
if (Platform.isMacOS) {
storageLocation = await File('cache').create().then(
(value) => value.writeAsString(
'{}',
flush: true,
),
);
return storageLocation.path;
}
if (Platform.isLinux) {
storageLocation = await getApplicationDocumentsDirectory();
return storageLocation.path;
}
debugPrint('[initStorageLocation] no cache support');
return null;
} catch (error) {
debugPrint('[initStorageLocation] $error');
return null;
}
}
```

```dart
// reduce several maps to one map
final allDirectUsers = roomsDirectUsers.fold(
{},
(usersAll, users) {
(usersAll as Map).addAll(users);
return usersAll;
},
);
```
8 changes: 0 additions & 8 deletions build.yaml

This file was deleted.

29 changes: 29 additions & 0 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ PODS:
- Flutter
- flutter_secure_storage (3.3.1):
- Flutter
- FMDB (2.7.5):
- FMDB/standard (= 2.7.5)
- FMDB/SQLCipher (2.7.5):
- SQLCipher
- FMDB/standard (2.7.5)
- image_picker (0.0.1):
- Flutter
- OLMKit (3.1.0):
Expand All @@ -60,6 +65,18 @@ PODS:
- SDWebImage/Core (~> 5.6)
- shared_preferences (0.0.1):
- Flutter
- sqflite (0.0.2):
- Flutter
- FMDB (>= 2.7.5)
- sqflite_sqlcipher (0.0.1):
- Flutter
- FMDB/SQLCipher (~> 2.7.5)
- SQLCipher (= 4.4.1)
- SQLCipher (4.4.1):
- SQLCipher/standard (= 4.4.1)
- SQLCipher/common (4.4.1)
- SQLCipher/standard (4.4.1):
- SQLCipher/common
- url_launcher (0.0.1):
- Flutter
- webview_flutter (0.0.1):
Expand All @@ -76,6 +93,8 @@ DEPENDENCIES:
- package_info (from `.symlinks/plugins/package_info/ios`)
- path_provider (from `.symlinks/plugins/path_provider/ios`)
- shared_preferences (from `.symlinks/plugins/shared_preferences/ios`)
- sqflite (from `.symlinks/plugins/sqflite/ios`)
- sqflite_sqlcipher (from `.symlinks/plugins/sqflite_sqlcipher/ios`)
- url_launcher (from `.symlinks/plugins/url_launcher/ios`)
- webview_flutter (from `.symlinks/plugins/webview_flutter/ios`)

Expand All @@ -84,9 +103,11 @@ SPEC REPOS:
- DKImagePickerController
- DKPhotoGallery
- FLAnimatedImage
- FMDB
- OLMKit
- SDWebImage
- SDWebImageFLPlugin
- SQLCipher

EXTERNAL SOURCES:
device_info:
Expand All @@ -107,6 +128,10 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/path_provider/ios"
shared_preferences:
:path: ".symlinks/plugins/shared_preferences/ios"
sqflite:
:path: ".symlinks/plugins/sqflite/ios"
sqflite_sqlcipher:
:path: ".symlinks/plugins/sqflite_sqlcipher/ios"
url_launcher:
:path: ".symlinks/plugins/url_launcher/ios"
webview_flutter:
Expand All @@ -121,13 +146,17 @@ SPEC CHECKSUMS:
Flutter: 0e3d915762c693b495b44d77113d4970485de6ec
flutter_local_notifications: 9e4738ce2471c5af910d961a6b7eadcf57c50186
flutter_secure_storage: 7953c38a04c3fdbb00571bcd87d8e3b5ceb9daec
FMDB: 2ce00b547f966261cd18927a3ddb07cb6f3db82a
image_picker: 9c3312491f862b28d21ecd8fdf0ee14e601b3f09
OLMKit: 4ee0159d63feeb86d836fdcfefe418e163511639
package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62
path_provider: abfe2b5c733d04e238b0d8691db0cfd63a27a93c
SDWebImage: 84000f962cbfa70c07f19d2234cbfcf5d779b5dc
SDWebImageFLPlugin: 6c2295fb1242d44467c6c87dc5db6b0a13228fd8
shared_preferences: af6bfa751691cdc24be3045c43ec037377ada40d
sqflite: 6d358c025f5b867b29ed92fc697fd34924e11904
sqflite_sqlcipher: cc00ecef02643b799857eb5c66c7074660aa658a
SQLCipher: 0b81a39b21247c559c52c3bd2234808e626c008b
url_launcher: 6fef411d543ceb26efce54b05a0a40bfd74cbbef
webview_flutter: d2b4d6c66968ad042ad94cbb791f5b72b4678a96

Expand Down
8 changes: 8 additions & 0 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,12 @@
"${BUILT_PRODUCTS_DIR}/DKImagePickerController/DKImagePickerController.framework",
"${BUILT_PRODUCTS_DIR}/DKPhotoGallery/DKPhotoGallery.framework",
"${BUILT_PRODUCTS_DIR}/FLAnimatedImage/FLAnimatedImage.framework",
"${BUILT_PRODUCTS_DIR}/FMDB/FMDB.framework",
"${PODS_ROOT}/../Flutter/Flutter.framework",
"${BUILT_PRODUCTS_DIR}/OLMKit/OLMKit.framework",
"${BUILT_PRODUCTS_DIR}/SDWebImage/SDWebImage.framework",
"${BUILT_PRODUCTS_DIR}/SDWebImageFLPlugin/SDWebImageFLPlugin.framework",
"${BUILT_PRODUCTS_DIR}/SQLCipher/SQLCipher.framework",
"${BUILT_PRODUCTS_DIR}/device_info/device_info.framework",
"${BUILT_PRODUCTS_DIR}/file_picker/file_picker.framework",
"${BUILT_PRODUCTS_DIR}/flutter_local_notifications/flutter_local_notifications.framework",
Expand All @@ -231,6 +233,8 @@
"${BUILT_PRODUCTS_DIR}/package_info/package_info.framework",
"${BUILT_PRODUCTS_DIR}/path_provider/path_provider.framework",
"${BUILT_PRODUCTS_DIR}/shared_preferences/shared_preferences.framework",
"${BUILT_PRODUCTS_DIR}/sqflite/sqflite.framework",
"${BUILT_PRODUCTS_DIR}/sqflite_sqlcipher/sqflite_sqlcipher.framework",
"${BUILT_PRODUCTS_DIR}/url_launcher/url_launcher.framework",
"${BUILT_PRODUCTS_DIR}/webview_flutter/webview_flutter.framework",
);
Expand All @@ -239,10 +243,12 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKImagePickerController.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/DKPhotoGallery.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FLAnimatedImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/FMDB.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Flutter.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/OLMKit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImage.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SDWebImageFLPlugin.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/SQLCipher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/device_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/file_picker.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_local_notifications.framework",
Expand All @@ -251,6 +257,8 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/shared_preferences.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/sqflite_sqlcipher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/webview_flutter.framework",
);
Expand Down
Loading

0 comments on commit 5a2c2e2

Please sign in to comment.