Skip to content

Commit

Permalink
Put back missing animations when removing Attachments
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinBoulongne committed May 1, 2024
1 parent dea02bc commit 984244b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -479,9 +479,9 @@ class NewMessageFragment : Fragment() {
saveDraft()
}

val shouldTransition = attachmentAdapter.itemCount != 0 && attachments.isEmpty()
attachmentAdapter.submitList(attachments)
if (shouldTransition) TransitionManager.beginDelayedTransition(binding.root)
if (attachments.count() != attachmentAdapter.itemCount) attachmentAdapter.submitList(attachments)

if (attachments.isEmpty()) TransitionManager.beginDelayedTransition(binding.root)
binding.attachmentsRecyclerView.isVisible = attachments.isNotEmpty()

updateIsSendingAllowed(attachments)
Expand Down

0 comments on commit 984244b

Please sign in to comment.