mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 06:55:59 +00:00
Add a feature flag for the new RoomThreadList screen.
This commit is contained in:
committed by
Stefan Ceriu
parent
e7e1e990db
commit
9406148689
@@ -62,6 +62,7 @@ struct RoomScreenViewState: BindableState {
|
||||
isCallingEnabled && !isParticipatingInOngoingCall // Hide the join call button when already in the call
|
||||
}
|
||||
|
||||
var roomThreadListEnabled = false
|
||||
var isKnockingEnabled = false
|
||||
var isKnockableRoom = false
|
||||
var canAcceptKnocks = false
|
||||
|
||||
@@ -164,6 +164,10 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
// MARK: - Private
|
||||
|
||||
private func setupSubscriptions(ongoingCallRoomIDPublisher: CurrentValuePublisher<String?, Never>) {
|
||||
appSettings.$roomThreadListEnabled
|
||||
.weakAssign(to: \.state.roomThreadListEnabled, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$knockingEnabled
|
||||
.weakAssign(to: \.state.isKnockingEnabled, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
@@ -179,6 +179,8 @@ struct RoomScreen: View {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if context.viewState.roomThreadListEnabled {
|
||||
if #available(iOS 26, *) {
|
||||
ToolbarSpacer(.fixed, placement: .primaryAction)
|
||||
}
|
||||
@@ -190,6 +192,7 @@ struct RoomScreen: View {
|
||||
CompoundIcon(\.threads)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
|
||||
Reference in New Issue
Block a user