Hide timeline style selection (#2968)

This commit is contained in:
Mauro
2024-06-26 12:42:12 +02:00
committed by GitHub
parent 82823c94ce
commit 342cfc0d3f
9 changed files with 9 additions and 22 deletions
@@ -149,7 +149,7 @@ struct RoomScreenViewState: BindableState {
var typingMembers: [String] = []
var showLoading = false
var showReadReceipts = false
var timelineStyle: TimelineStyle
let timelineStyle = TimelineStyle.bubbles
var isEncryptedOneToOneRoom = false
var timelineViewState: TimelineViewState // check the doc before changing this
@@ -83,7 +83,6 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
super.init(initialViewState: RoomScreenViewState(roomID: roomProxy.id,
roomTitle: roomProxy.roomTitle,
roomAvatar: roomProxy.avatar,
timelineStyle: appSettings.timelineStyle,
isEncryptedOneToOneRoom: roomProxy.isEncryptedOneToOneRoom,
timelineViewState: TimelineViewState(focussedEvent: focussedEventID.map { .init(eventID: $0, appearance: .immediate) }),
ownUserID: roomProxy.ownUserID,
@@ -392,10 +391,6 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
}
.store(in: &cancellables)
appSettings.$timelineStyle
.weakAssign(to: \.state.timelineStyle, on: self)
.store(in: &cancellables)
appSettings.$sharePresence
.weakAssign(to: \.state.showReadReceipts, on: self)
.store(in: &cancellables)
@@ -38,7 +38,6 @@ struct AdvancedSettingsScreenViewStateBindings {
enum AdvancedSettingsScreenViewAction { }
protocol AdvancedSettingsProtocol: AnyObject {
var timelineStyle: TimelineStyle { get set }
var viewSourceEnabled: Bool { get set }
var appAppearance: AppAppearance { get set }
var sharePresence: Bool { get set }
@@ -27,10 +27,6 @@ struct AdvancedSettingsScreen: View {
kind: .picker(selection: $context.appAppearance,
items: AppAppearance.allCases.map { (title: $0.name, tag: $0) }))
ListRow(label: .plain(title: L10n.commonMessageLayout),
kind: .picker(selection: $context.timelineStyle,
items: TimelineStyle.allCases.map { (title: $0.name, tag: $0) }))
ListRow(label: .plain(title: L10n.actionViewSource),
kind: .toggle($context.viewSourceEnabled))