diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml
index 90c866455..4672bed21 100644
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -111,4 +111,5 @@
tools:ignore="ScopedStorage" />
+
\ No newline at end of file
diff --git a/android/app/src/main/res/drawable/notification_icon.png b/android/app/src/main/res/drawable/notification_icon.png
index 05f1fc8c3..dbaecfac8 100644
Binary files a/android/app/src/main/res/drawable/notification_icon.png and b/android/app/src/main/res/drawable/notification_icon.png differ
diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift
index 78e65dbde..07cf964c9 100644
--- a/ios/Runner/AppDelegate.swift
+++ b/ios/Runner/AppDelegate.swift
@@ -10,6 +10,10 @@ import Flutter
var flutter_native_splash = 1
UIApplication.shared.isStatusBarHidden = false
+ if #available(iOS 10.0, *) {
+ UNUserNotificationCenter.current().delegate = self as UNUserNotificationCenterDelegate
+ }
+
GeneratedPluginRegistrant.register(with: self)
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
}
diff --git a/lib/db/files_db.dart b/lib/db/files_db.dart
index b15025c4b..ee7ec4cd7 100644
--- a/lib/db/files_db.dart
+++ b/lib/db/files_db.dart
@@ -50,6 +50,7 @@ class FilesDB {
static const columnCreationTime = 'creation_time';
static const columnModificationTime = 'modification_time';
static const columnUpdationTime = 'updation_time';
+ static const columnAddedTime = 'added_time';
static const columnEncryptedKey = 'encrypted_key';
static const columnKeyDecryptionNonce = 'key_decryption_nonce';
static const columnFileDecryptionHeader = 'file_decryption_header';
@@ -82,6 +83,7 @@ class FilesDB {
...addFileSizeColumn(),
...updateIndexes(),
...createEntityDataTable(),
+ ...addAddedTime(),
];
final dbConfig = MigrationConfig(
@@ -367,6 +369,17 @@ class FilesDB {
];
}
+ static List addAddedTime() {
+ return [
+ '''
+ ALTER TABLE $filesTable ADD COLUMN $columnAddedTime INTEGER NOT NULL DEFAULT -1;
+ ''',
+ '''
+ CREATE INDEX IF NOT EXISTS added_time_index ON $filesTable($columnAddedTime);
+ '''
+ ];
+ }
+
Future clearTable() async {
final db = await instance.database;
await db.delete(filesTable);
@@ -627,6 +640,23 @@ class FilesDB {
return files;
}
+ Future> getNewFilesInCollection(
+ int collectionID,
+ int addedTime,
+ ) async {
+ final db = await instance.database;
+ const String whereClause =
+ '$columnCollectionID = ? AND $columnAddedTime > ?';
+ final List