Cleanup merge leftovers

This commit is contained in:
Alfonso Grillo
2022-11-03 14:47:08 +01:00
parent 5a083ae69e
commit 68e02935d7
4 changed files with 27 additions and 16 deletions
@@ -54,10 +54,16 @@ struct UserSessionListItem: View {
Image(sessionDetailsIcon)
.padding(.leading, 2)
}
Text(viewData.sessionDetails)
.font(theme.fonts.caption1)
.foregroundColor(theme.colors.secondaryContent)
.multilineTextAlignment(.leading)
VStack(alignment: .leading, spacing: 0) {
Text(viewData.sessionDetails)
if showsLocationInfo, let ipText = ipText {
Text(ipText)
}
}
.font(theme.fonts.caption1)
.foregroundColor(theme.colors.secondaryContent)
.multilineTextAlignment(.leading)
}
.padding(.bottom, 16)
.padding(.trailing, 16)
@@ -68,7 +74,8 @@ struct UserSessionListItem: View {
}
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 16)
}.onTapGesture {
}
.onTapGesture {
onBackgroundTap?(viewData.sessionId)
}
.onLongPressGesture {
@@ -27,7 +27,6 @@ struct UserSessionListItemViewData: Identifiable, Hashable {
let sessionId: SessionId
let sessionName: String
let sessionDetails: String
let highlightSessionDetails: Bool
let deviceAvatarViewData: DeviceAvatarViewData
let sessionDetailsIcon: String?
let isSelected: Bool
@@ -144,11 +144,15 @@ struct UserSessionsOverview: View {
private var otherSessionsMenu: some View {
Menu {
Button { viewModel.showLocationInfo.toggle() } label: {
Button {
viewModel.showLocationInfo.toggle()
} label: {
let text = viewModel.showLocationInfo ? VectorL10n.userSessionsHideLocationInfo : VectorL10n.userSessionsShowLocationInfo
let image = viewModel.showLocationInfo ? "eye.slash" : "eye"
Label(text, systemImage: image)
}
signOutButton
} label: {
menuImage
}
@@ -186,7 +190,7 @@ struct UserSessionsOverview: View {
.foregroundColor(theme.colors.secondaryContent)
.padding(.bottom, 8.0)
Spacer()
optionsMenu
otherSessionsMenu
}
Text(VectorL10n.userSessionsOverviewOtherSessionsSectionInfo)