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,
|
||||
onPreviewLoaded: ((attachment: EntryAttachmentState) -> Unit)? = null) {
|
||||
// When only one attachment is allowed
|
||||
if (!mAllowMultipleAttachments) {
|
||||
clearAttachments()
|
||||
if (!mAllowMultipleAttachments
|
||||
&& attachment.downloadState == AttachmentState.START) {
|
||||
attachmentsAdapter?.clear()
|
||||
}
|
||||
attachmentsContainerView.visibility = View.VISIBLE
|
||||
attachmentsAdapter?.putItem(attachment)
|
||||
@@ -315,10 +316,6 @@ class EntryEditFragment: DatabaseFragment() {
|
||||
attachmentsAdapter?.removeItem(attachment)
|
||||
}
|
||||
|
||||
private fun clearAttachments() {
|
||||
attachmentsAdapter?.clear()
|
||||
}
|
||||
|
||||
private fun getAttachmentViewPosition(attachment: EntryAttachmentState,
|
||||
position: (attachment: EntryAttachmentState, Float) -> Unit) {
|
||||
attachmentsListView.postDelayed({
|
||||
|
||||
Reference in New Issue
Block a user