Skip to content

Commit

Permalink
Merge pull request #1832 from Infomaniak/too-much-draft-saving
Browse files Browse the repository at this point in the history
Only save Draft when adding Attachment
  • Loading branch information
KevinBoulongne committed May 1, 2024
2 parents 8f4dcd3 + 5be7da0 commit 3962e4e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ import com.infomaniak.mail.utils.extensions.updateNavigationBarColor
class ThreadListMultiSelection {

lateinit var mainViewModel: MainViewModel
lateinit var threadListFragment: ThreadListFragment
private lateinit var threadListFragment: ThreadListFragment
lateinit var unlockSwipeActionsIfSet: () -> Unit
lateinit var localSettings: LocalSettings

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,9 @@ class NewMessageFragment : Fragment() {
if (isFirstTime) {
isFirstTime = false
observeImportAttachments()
} else {
} else if (attachments.count() > attachmentAdapter.itemCount) {
// If we are adding Attachments, directly save the Draft, so the Attachments' upload starts now.
// TODO: Only save Attachments, and not the whole Draft.
saveDraft()
}

Expand Down

0 comments on commit 3962e4e

Please sign in to comment.