mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Further design updates to the timeline. (#524)
- Decryption banner on the timeline - Bubble colours - Background insets - Multiline composer corner radius - Read marker - GIF indicator - Reactions shape - Use RoomTimelineViewLabelStyle everywhere possible - Only set a line limit on reply quotes, allow all the lines for regular quotes. - Message label icons - Yes/No button casing - Make sender profiles immutable. - Enable copy link and invite buttons. - Fix layout loop detecting multiline composer text. - Add animation to the encryption banner.
This commit is contained in:
@@ -218,11 +218,12 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
updateTimelineItems()
|
||||
}
|
||||
|
||||
// swiftlint:disable:next cyclomatic_complexity
|
||||
// swiftlint:disable:next cyclomatic_complexity function_body_length
|
||||
private func updateTimelineItems() {
|
||||
var newTimelineItems = [RoomTimelineItemProtocol]()
|
||||
var canBackPaginate = true
|
||||
var isBackPaginating = false
|
||||
var hasEncryptedItems = false
|
||||
|
||||
var createdIdentifiers = [String: Bool]()
|
||||
|
||||
@@ -243,6 +244,9 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
if createdIdentifiers[timelineItem.id] == nil {
|
||||
newTimelineItems.append(timelineItem)
|
||||
createdIdentifiers[timelineItem.id] = true
|
||||
if timelineItem is EncryptedRoomTimelineItem {
|
||||
hasEncryptedItems = true
|
||||
}
|
||||
} else {
|
||||
MXLog.error("Found duplicated timeline item, ignoring")
|
||||
}
|
||||
@@ -280,6 +284,7 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
||||
callbacks.send(.updatedTimelineItems)
|
||||
callbacks.send(.canBackPaginate(canBackPaginate))
|
||||
callbacks.send(.isBackPaginating(isBackPaginating))
|
||||
callbacks.send(.hasEncryptedItems(hasEncryptedItems))
|
||||
}
|
||||
|
||||
private func computeGroupState(for itemProxy: TimelineItemProxy,
|
||||
|
||||
+1
@@ -23,6 +23,7 @@ enum RoomTimelineControllerCallback {
|
||||
case updatedTimelineItem(_ itemId: String)
|
||||
case canBackPaginate(Bool)
|
||||
case isBackPaginating(Bool)
|
||||
case hasEncryptedItems(Bool)
|
||||
}
|
||||
|
||||
enum RoomTimelineControllerAction {
|
||||
|
||||
Reference in New Issue
Block a user