mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-20 17:11:32 -08:00
Change delta reload time to 10 seconds to prevent dialog spamming #875
This commit is contained in:
1 parent
cfe01aa996
commit
528c167a88
1 file changed
+2
-1
@@ -142,9 +142,10 @@ open class DatabaseTaskNotificationService : LockNotificationService(), Progress
|
||||
val conditionExists = previousDatabaseInfo != null
|
||||
&& previousDatabaseInfo.exists != lastFileDatabaseInfo.exists
|
||||
// To prevent dialog opening too often
|
||||
// Add 10 seconds delta time to prevent spamming
|
||||
val conditionLastModification = (oldDatabaseModification != null && newDatabaseModification != null
|
||||
&& oldDatabaseModification < newDatabaseModification
|
||||
&& mLastLocalSaveTime + 5000 < newDatabaseModification)
|
||||
&& mLastLocalSaveTime + 10000 < newDatabaseModification)
|
||||
|
||||
if (conditionExists || conditionLastModification) {
|
||||
// Show the dialog only if it's real new info and not a delay after a save
|
||||
|
||||
Reference in new issue
Block a user