mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-29 21:33:07 -08:00
Remove flickering on the first database list load
This commit is contained in:
1 parent
4ed231b9bb
commit
db25f1999f
1 file changed
+10
-3
@@ -194,9 +194,16 @@ class FileDatabaseHistoryAdapter(context: Context)
|
||||
}
|
||||
|
||||
fun replaceAllDatabaseFileHistoryList(listFileDatabaseHistoryToAdd: List<DatabaseFile>) {
|
||||
listDatabaseFiles.clear()
|
||||
listDatabaseFiles.addAll(listFileDatabaseHistoryToAdd)
|
||||
notifyDataSetChanged()
|
||||
if (listDatabaseFiles.isEmpty()) {
|
||||
listFileDatabaseHistoryToAdd.forEach {
|
||||
listDatabaseFiles.add(it)
|
||||
notifyItemInserted(listDatabaseFiles.size)
|
||||
}
|
||||
} else {
|
||||
listDatabaseFiles.clear()
|
||||
listDatabaseFiles.addAll(listFileDatabaseHistoryToAdd)
|
||||
notifyDataSetChanged()
|
||||
}
|
||||
}
|
||||
|
||||
fun setOnFileDatabaseHistoryOpenListener(listener : ((DatabaseFile)->Unit)?) {
|
||||
|
||||
Reference in new issue
Block a user