Skip to content

Commit

Permalink
Add explanatory comment
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed May 1, 2024
1 parent 984244b commit 8f4dcd3
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,8 @@ class NewMessageFragment : Fragment() {
saveDraft()
}

// When removing an Attachment, both counts will be the same, because the Adapter is already notified.
// We don't want to notify it again, because it will cancel the nice animation.
if (attachments.count() != attachmentAdapter.itemCount) attachmentAdapter.submitList(attachments)

if (attachments.isEmpty()) TransitionManager.beginDelayedTransition(binding.root)
Expand Down

0 comments on commit 8f4dcd3

Please sign in to comment.