Skip to content
Snippets Groups Projects
Commit a6cdfdab authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

setting: fix display of account state

This patch ensures the account state is displayed
properly: online, offline, or connecting.

Change-Id: I9db1b394062edd9dfa9eb2a3c94b2e8d93ada6e6
parent 028bd9a8
No related branches found
No related tags found
No related merge requests found
......@@ -180,8 +180,7 @@ extension AccountSummaryVM {
self.accountService.sharedResponseStream
.filter({ [weak self] serviceEvent in
guard let self = self else { return false }
guard serviceEvent
.getEventInput(ServiceEventInput.registrationState) != nil else { return false }
guard serviceEvent.getEventInput(ServiceEventInput.registrationState) as String? != nil else { return false }
guard let accountId: String = serviceEvent
.getEventInput(ServiceEventInput.accountId),
accountId == self.account.id else { return false }
......
......@@ -47,11 +47,17 @@ struct AccountSummaryView: View {
profileSection()
Section(header: Text(L10n.AccountPage.accountHeader)) {
ToggleCell(
toggleText: L10n.Account.statusOnline,
getAction: { model.accountEnabled },
setAction: { newValue in model.enableAccount(enable: newValue) }
)
HStack {
Text(model.accountStatus)
Spacer()
Toggle("", isOn: Binding(
get: { model.accountEnabled },
set: { newValue in model.enableAccount(enable: newValue) }
))
.labelsHidden()
.toggleStyle(SwitchToggleStyle(tint: Color.jamiColor))
}
.accessibilityElement(children: .combine)
}
if model.account.type == .sip {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment