mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +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:
@@ -103,7 +103,7 @@ struct RoomScreen: View {
|
||||
}
|
||||
|
||||
private var scrollToBottomButton: some View {
|
||||
Button(action: scrollToBottom) {
|
||||
Button { context.send(viewAction: .scrollToBottom) } label: {
|
||||
Image(systemName: "chevron.down")
|
||||
.font(.compound.bodyLG)
|
||||
.fontWeight(.semibold)
|
||||
@@ -121,20 +121,13 @@ struct RoomScreen: View {
|
||||
.opacity(isAtBottomAndLive ? 0.0 : 1.0)
|
||||
.accessibilityHidden(isAtBottomAndLive)
|
||||
.animation(.elementDefault, value: isAtBottomAndLive)
|
||||
.accessibilityIdentifier(A11yIdentifiers.roomScreen.scrollToBottom)
|
||||
}
|
||||
|
||||
private var isAtBottomAndLive: Bool {
|
||||
context.isScrolledToBottom && context.viewState.timelineViewState.isLive
|
||||
}
|
||||
|
||||
private func scrollToBottom() {
|
||||
if context.viewState.timelineViewState.isLive {
|
||||
context.viewState.timelineViewState.scrollToBottomPublisher.send(())
|
||||
} else {
|
||||
context.send(viewAction: .focusLive)
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var loadingIndicator: some View {
|
||||
if context.viewState.showLoading {
|
||||
|
||||
Reference in New Issue
Block a user