mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2025-12-04 15:49:33 +01:00
Fix upload attachment
This commit is contained in:
@@ -301,8 +301,9 @@ class EntryEditFragment: DatabaseFragment() {
|
|||||||
private fun putAttachment(attachment: EntryAttachmentState,
|
private fun putAttachment(attachment: EntryAttachmentState,
|
||||||
onPreviewLoaded: ((attachment: EntryAttachmentState) -> Unit)? = null) {
|
onPreviewLoaded: ((attachment: EntryAttachmentState) -> Unit)? = null) {
|
||||||
// When only one attachment is allowed
|
// When only one attachment is allowed
|
||||||
if (!mAllowMultipleAttachments) {
|
if (!mAllowMultipleAttachments
|
||||||
clearAttachments()
|
&& attachment.downloadState == AttachmentState.START) {
|
||||||
|
attachmentsAdapter?.clear()
|
||||||
}
|
}
|
||||||
attachmentsContainerView.visibility = View.VISIBLE
|
attachmentsContainerView.visibility = View.VISIBLE
|
||||||
attachmentsAdapter?.putItem(attachment)
|
attachmentsAdapter?.putItem(attachment)
|
||||||
@@ -315,10 +316,6 @@ class EntryEditFragment: DatabaseFragment() {
|
|||||||
attachmentsAdapter?.removeItem(attachment)
|
attachmentsAdapter?.removeItem(attachment)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun clearAttachments() {
|
|
||||||
attachmentsAdapter?.clear()
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun getAttachmentViewPosition(attachment: EntryAttachmentState,
|
private fun getAttachmentViewPosition(attachment: EntryAttachmentState,
|
||||||
position: (attachment: EntryAttachmentState, Float) -> Unit) {
|
position: (attachment: EntryAttachmentState, Float) -> Unit) {
|
||||||
attachmentsListView.postDelayed({
|
attachmentsListView.postDelayed({
|
||||||
|
|||||||
Reference in New Issue
Block a user