mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-04 10:33:45 +00:00
#1246 - Prevent timeline items from being computed on the main thread when instantiating the RoomTimelineController; speed up the room selection animation.
This commit is contained in:
committed by
Stefan Ceriu
parent
82981f33e9
commit
29bcc5371a
@@ -169,7 +169,7 @@ struct HomeScreenRoomCellButtonStyle: ButtonStyle {
|
|||||||
configuration.label
|
configuration.label
|
||||||
.background(isSelected ? Color.compound.bgSubtleSecondary : Color.compound.bgCanvasDefault)
|
.background(isSelected ? Color.compound.bgSubtleSecondary : Color.compound.bgCanvasDefault)
|
||||||
.contentShape(Rectangle())
|
.contentShape(Rectangle())
|
||||||
.animation(.elementDefault, value: isSelected)
|
.animation(isSelected ? .none : .easeOut(duration: 0.1), value: isSelected)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -62,7 +62,9 @@ class RoomTimelineController: RoomTimelineControllerProtocol {
|
|||||||
}
|
}
|
||||||
.store(in: &cancellables)
|
.store(in: &cancellables)
|
||||||
|
|
||||||
updateTimelineItems()
|
serialDispatchQueue.async {
|
||||||
|
self.updateTimelineItems()
|
||||||
|
}
|
||||||
|
|
||||||
NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange), name: UIContentSizeCategory.didChangeNotification, object: nil)
|
NotificationCenter.default.addObserver(self, selector: #selector(contentSizeCategoryDidChange), name: UIContentSizeCategory.didChangeNotification, object: nil)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user