mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-11-11 16:07:49 +00:00
background date visibility
This commit is contained in:
1 file changed
+13
-7
@@ -519,14 +519,20 @@ struct ChatView: View {
|
||||
}
|
||||
|
||||
private func setDate(visibility isVisible: Bool) {
|
||||
if isVisible {
|
||||
if !isNearBottom,
|
||||
!isDateVisible,
|
||||
let date, !Calendar.current.isDateInToday(date) {
|
||||
withAnimation { isDateVisible = true }
|
||||
Task {
|
||||
if isVisible {
|
||||
if !isNearBottom,
|
||||
!isDateVisible,
|
||||
let date, !Calendar.current.isDateInToday(date) {
|
||||
await MainActor.run {
|
||||
withAnimation { isDateVisible = true }
|
||||
}
|
||||
}
|
||||
} else if isDateVisible {
|
||||
await MainActor.run {
|
||||
withAnimation { isDateVisible = false }
|
||||
}
|
||||
}
|
||||
} else if isDateVisible {
|
||||
withAnimation { isDateVisible = false }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user