mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Rename removeUnlinkedAttachments
This commit is contained in:
@@ -34,7 +34,7 @@ open class SaveDatabaseRunnable(protected var context: Context,
|
|||||||
override fun onStartRun() {}
|
override fun onStartRun() {}
|
||||||
|
|
||||||
override fun onActionRun() {
|
override fun onActionRun() {
|
||||||
database.removeUnlinkedAttachment()
|
// TODO as setting database.removeUnlinkedAttachments()
|
||||||
if (saveDatabase && result.isSuccess) {
|
if (saveDatabase && result.isSuccess) {
|
||||||
try {
|
try {
|
||||||
database.saveData(context.contentResolver)
|
database.saveData(context.contentResolver)
|
||||||
|
|||||||
@@ -454,9 +454,9 @@ class Database {
|
|||||||
mDatabaseKDBX?.removeAttachmentIfNotUsed(attachment)
|
mDatabaseKDBX?.removeAttachmentIfNotUsed(attachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun removeUnlinkedAttachment() {
|
fun removeUnlinkedAttachments() {
|
||||||
// No check in database KDB because unique attachment by entry
|
// No check in database KDB because unique attachment by entry
|
||||||
mDatabaseKDBX?.removeUnlinkedAttachment()
|
mDatabaseKDBX?.removeUnlinkedAttachments()
|
||||||
}
|
}
|
||||||
|
|
||||||
@Throws(DatabaseOutputException::class)
|
@Throws(DatabaseOutputException::class)
|
||||||
|
|||||||
@@ -553,10 +553,10 @@ class DatabaseKDBX : DatabaseVersioned<UUID, UUID, GroupKDBX, EntryKDBX> {
|
|||||||
|
|
||||||
fun removeAttachmentIfNotUsed(attachment: Attachment) {
|
fun removeAttachmentIfNotUsed(attachment: Attachment) {
|
||||||
// Remove attachment from pool
|
// Remove attachment from pool
|
||||||
removeUnlinkedAttachment(attachment.binaryAttachment)
|
removeUnlinkedAttachments(attachment.binaryAttachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun removeUnlinkedAttachment(vararg binaries: BinaryAttachment) {
|
fun removeUnlinkedAttachments(vararg binaries: BinaryAttachment) {
|
||||||
// Build binaries to remove with all binaries known
|
// Build binaries to remove with all binaries known
|
||||||
val binariesToRemove = ArrayList<BinaryAttachment>()
|
val binariesToRemove = ArrayList<BinaryAttachment>()
|
||||||
if (binaries.isEmpty()) {
|
if (binaries.isEmpty()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user