Cleanup code

This commit is contained in:
Alfonso Grillo
2022-11-02 16:33:51 +01:00
parent 68e02935d7
commit d7f8aefdb0
4 changed files with 31 additions and 10 deletions
@@ -70,10 +70,10 @@ struct UserSessionOverview: View {
.accessibilityIdentifier(VectorL10n.manageSessionRename)
if viewModel.viewState.isCurrentSession == false {
Button { viewModel.showLocationInfo.toggle() } label: {
let text = viewModel.showLocationInfo ? VectorL10n.userSessionsHideLocationInfo : VectorL10n.userSessionsShowLocationInfo
let image = viewModel.showLocationInfo ? "eye.slash" : "eye"
Label(text, systemImage: image)
Button {
viewModel.showLocationInfo.toggle()
} label: {
Label(showLocationInfo: viewModel.showLocationInfo)
}
}
}