Skip to content

Commit ecc9953

Browse files
committed
increase the delay in hiding SR to not clash with UITableView's anim
and reintroduce skipping animations on bubble layouts if we're just changing the messageBubbleTopPadding, as per #4127 (comment)
1 parent ad17c13 commit ecc9953

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

ElementX/Sources/Screens/Timeline/View/Style/TimelineItemBubbledStylerView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ struct TimelineItemBubbledStylerView<Content: View>: View {
9393
// N.B. we can't combine two paddings together without triggering popping.
9494
.padding(.top, messageBubbleTopPadding)
9595
// don't reanimate bubble layouts if we're just changing the messageBubbleTopPadding
96-
// .animation(nil, value: messageBubbleTopPadding)
96+
.animation(nil, value: messageBubbleTopPadding)
9797
.highlightedTimelineItem(isFocussed)
9898
}
9999

ElementX/Sources/Screens/Timeline/View/Supplementary/TimelineItemStatusView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct TimelineItemStatusView: View {
3434
} else if isSendReceiptVisible {
3535
// we were the last msg in the timeline, but not any more
3636
// so remove the SR after a short delay to avoid racing with the new msg animation
37-
DispatchQueue.main.asyncAfter(deadline: .now() + 0.01) {
37+
DispatchQueue.main.asyncAfter(deadline: .now() + 0.2) {
3838
withAnimation {
3939
isSendReceiptVisible = false
4040
}
@@ -64,6 +64,7 @@ struct TimelineItemStatusView: View {
6464
if isSendReceiptVisible {
6565
// We only display the sent icon for the latest outgoing message
6666
TimelineDeliveryStatusView(deliveryStatus: .sent)
67+
// .transition(.identity) // makes the SR disappear rapidly to avoid ugly z-index flickering
6768
}
6869
case .sendingFailed:
6970
// Bubbles handle the case internally

0 commit comments

Comments
 (0)