mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Expose Element Call settings in the developer options. Start using th… (#2039)
* Expose Element Call settings in the developer options. Start using the encryption widget parameter. * Remove the Element Call feature flag
This commit is contained in:
@@ -116,7 +116,6 @@ struct RoomScreenViewState: BindableState {
|
||||
|
||||
var ownUserID: String
|
||||
|
||||
var showCallButton = false
|
||||
var isCallOngoing = false
|
||||
|
||||
var bindings: RoomScreenViewStateBindings
|
||||
|
||||
@@ -264,11 +264,7 @@ class RoomScreenViewModel: RoomScreenViewModelType, RoomScreenViewModelProtocol
|
||||
appSettings.$readReceiptsEnabled
|
||||
.weakAssign(to: \.state.readReceiptsEnabled, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
appSettings.$elementCallEnabled
|
||||
.weakAssign(to: \.state.showCallButton, on: self)
|
||||
.store(in: &cancellables)
|
||||
|
||||
|
||||
roomProxy.members
|
||||
.map { members in
|
||||
members.reduce(into: [String: RoomMemberState]()) { dictionary, member in
|
||||
|
||||
@@ -162,21 +162,19 @@ struct RoomScreen: View {
|
||||
|
||||
@ViewBuilder
|
||||
private var callButton: some View {
|
||||
if context.viewState.showCallButton {
|
||||
if context.viewState.isCallOngoing {
|
||||
Button {
|
||||
context.send(viewAction: .presentCall)
|
||||
} label: {
|
||||
Label(L10n.actionJoin, icon: \.videoCallSolid)
|
||||
.labelStyle(.titleAndIcon)
|
||||
}
|
||||
.buttonStyle(ElementCallButtonStyle())
|
||||
} else {
|
||||
Button {
|
||||
context.send(viewAction: .presentCall)
|
||||
} label: {
|
||||
CompoundIcon(\.videoCallSolid)
|
||||
}
|
||||
if context.viewState.isCallOngoing {
|
||||
Button {
|
||||
context.send(viewAction: .presentCall)
|
||||
} label: {
|
||||
Label(L10n.actionJoin, icon: \.videoCallSolid)
|
||||
.labelStyle(.titleAndIcon)
|
||||
}
|
||||
.buttonStyle(ElementCallButtonStyle())
|
||||
} else {
|
||||
Button {
|
||||
context.send(viewAction: .presentCall)
|
||||
} label: {
|
||||
CompoundIcon(\.videoCallSolid)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user