mirror of
https://github.com/Kunzisoft/KeePassDX.git
synced 2026-11-30 13:52:58 -08:00
Fix upload attachment
This commit is contained in:
1 parent
d841c25bd3
commit
5e15f82313
1 file changed
+3
-6
@@ -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