fix: History

This commit is contained in:
J-Jamet committed 2026-04-25 20:38:36 +02:00
1 parent 6bd891f99b
commit efb3bbb639
4 files changed
+6 -4

No files matched your search

@@ -42,6 +42,8 @@ class UpdateEntryRunnable(
mNewEntry.addParentFrom(mOldEntry)
// Re-attribute history removed to save memory in Bundle creation
// Clear to be sure
mNewEntry.clearHistory()
mOldEntry.getHistory().forEach {
mNewEntry.addEntryToHistory(it)
}
@@ -186,7 +186,7 @@ class DatabaseViewModel(application: Application): AndroidViewModel(application)
save: Boolean
) {
// Remove the history to keep memory
entryToUpdate.removeAllHistory()
entryToUpdate.clearHistory()
mDatabaseTaskProvider.startDatabaseUpdateEntry(
oldEntry,
entryToUpdate,
@@ -450,8 +450,8 @@ class Entry : Node, EntryVersionedInterface<Group> {
return null
}
fun removeAllHistory() {
entryKDBX?.removeAllHistory()
fun clearHistory() {
entryKDBX?.clearHistory()
}
fun getSize(attachmentPool: AttachmentPool): Long {
@@ -378,7 +378,7 @@ class EntryKDBX : EntryVersioned<UUID, UUID, GroupKDBX, EntryKDBX>, NodeKDBXInte
} else null
}
fun removeAllHistory() {
fun clearHistory() {
history.clear()
}