Disable the threaded timeline composer when the room is read only.

This commit is contained in:
Stefan Ceriu
2025-06-03 17:52:55 +03:00
committed by Stefan Ceriu
parent 9804be70eb
commit c3a9e5deaa
4 changed files with 39 additions and 13 deletions
@@ -64,16 +64,15 @@ struct ThreadTimelineScreen: View {
@ViewBuilder
private var composer: some View {
#warning("Check permissions here too")
// if roomContext.viewState.canSendMessage {
composerToolbar
// } else {
// Text(L10n.screenRoomTimelineNoPermissionToPost)
// .font(.compound.bodyLG)
// .foregroundStyle(.compound.textDisabled)
// .multilineTextAlignment(.center)
// .padding(.vertical, 10) // Matches the MessageComposerStyleModifier
// }
if context.viewState.canSendMessage {
composerToolbar
} else {
Text(L10n.screenRoomTimelineNoPermissionToPost)
.font(.compound.bodyLG)
.foregroundStyle(.compound.textDisabled)
.multilineTextAlignment(.center)
.padding(.vertical, 10) // Matches the MessageComposerStyleModifier
}
}
private var scrollToBottomButton: some View {