Skip to content

Commit 8213023

Browse files
Updated animation for date indicators in message list
1 parent e867295 commit 8213023

File tree

5 files changed

+22
-0
lines changed

5 files changed

+22
-0
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
1010

1111
### 🐞 Fixed
1212
- iOS 16 keyboard insets issue on pushed screen
13+
- Improved animation for date indicators in message list
1314

1415
# [4.21.0](https://github.com/GetStream/stream-chat-swiftui/releases/tag/4.21.0)
1516
_September 02, 2022_

Sources/StreamChatSwiftUI/ChatChannel/MessageList/MessageListView.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,7 @@ public struct MessageListView<Factory: ViewFactory>: View, KeyboardReadable {
157157
: nil
158158
)
159159
.flippedUpsideDown()
160+
.animation(nil, value: messageDate != nil)
160161
}
161162
.id(listId)
162163
}

StreamChatSwiftUITests/Tests/ChatChannel/MessageComposerView_Tests.swift

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -235,4 +235,24 @@ class MessageComposerView_Tests: StreamChatTestCase {
235235
// Then
236236
XCTAssert(newRequestId == nil)
237237
}
238+
239+
func test_videoIndicatorView_snapshot() {
240+
// Given
241+
let view = VideoIndicatorView()
242+
.frame(width: 100, height: 100)
243+
.background(.black)
244+
245+
// Then
246+
assertSnapshot(matching: view, as: .image)
247+
}
248+
249+
func test_videoDurationIndicatorView_snapshot() {
250+
// Given
251+
let view = VideoDurationIndicatorView(duration: "02:54")
252+
.frame(width: 100, height: 100)
253+
.background(.black)
254+
255+
// Then
256+
assertSnapshot(matching: view, as: .image)
257+
}
238258
}
Loading
Loading

0 commit comments

Comments
 (0)