mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Permalink Tweaks 2 (#2766)
* Missing changelog. * Parse bare room aliases as permalinks. Update the SDK. * Fix tapping the same permalink twice. Add a test. Don't clear the focussed item when reaching the bottom of the timeline. * Make sure sending a message returns to live.
This commit is contained in:
@@ -85,6 +85,7 @@ enum RoomScreenViewAction {
|
||||
case sendReadReceiptIfNeeded(TimelineItemIdentifier)
|
||||
case paginateBackwards
|
||||
case paginateForwards
|
||||
case scrollToBottom
|
||||
|
||||
case timelineItemMenu(itemID: TimelineItemIdentifier)
|
||||
case timelineItemMenuAction(itemID: TimelineItemIdentifier, action: TimelineItemMenuAction)
|
||||
@@ -112,11 +113,8 @@ enum RoomScreenViewAction {
|
||||
case focusOnEventID(String)
|
||||
/// Switch back to a live timeline (from a detached one).
|
||||
case focusLive
|
||||
/// Remove the highlighted event without switching timeline.
|
||||
///
|
||||
/// This is useful when returning to the bottom of the live timeline
|
||||
/// if `focusOnEventID` didn't use a detached timeline.
|
||||
case clearFocussedEvent
|
||||
/// The timeline scrolled to reveal the focussed item.
|
||||
case scrolledToFocussedItem
|
||||
}
|
||||
|
||||
enum RoomScreenComposerAction {
|
||||
@@ -229,7 +227,10 @@ struct TimelineViewState {
|
||||
var isLive = true
|
||||
var paginationState = PaginationState.default
|
||||
|
||||
var focussedEventID: String?
|
||||
/// The ID of the focussed event navigated to via a permalink.
|
||||
var focussedEventID: String? { didSet { focussedEventNeedsDisplay = focussedEventID != nil } }
|
||||
/// Whether the timeline should scroll to `focussedEventID` once its item has been built and added to the timeline.
|
||||
var focussedEventNeedsDisplay: Bool
|
||||
|
||||
// These can be removed when we have full swiftUI and moved as @State values in the view
|
||||
var scrollToBottomPublisher = PassthroughSubject<Void, Never>()
|
||||
|
||||
Reference in New Issue
Block a user