Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only save Draft when adding Attachment #1832

Merged
merged 3 commits into from
May 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading