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:
Doug
2024-04-29 17:32:16 +01:00
committed by GitHub
parent aaa8af2996
commit 7c94ed98a5
18 changed files with 111 additions and 52 deletions
@@ -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 {