Link current session to session overview

This commit is contained in:
Aleksandrs Proskurins
2022-09-27 17:31:40 +03:00
parent 1169ed6ac0
commit f51b87557c
3 changed files with 35 additions and 8 deletions
@@ -112,14 +112,9 @@ struct UserSessionCardView: View {
}
if viewData.isCurrentSessionDisplayMode {
Button {
onViewDetailsAction?(viewData.sessionId)
} label: {
Text(VectorL10n.userSessionViewDetails)
.font(theme.fonts.body)
.foregroundColor(theme.colors.accent)
}
.padding(.top, 4)
Text(VectorL10n.userSessionViewDetails)
.font(theme.fonts.body)
.foregroundColor(theme.colors.accent)
}
}
.padding(24)
@@ -127,6 +122,11 @@ struct UserSessionCardView: View {
.background(theme.colors.background)
.clipShape(backgroundShape)
.shapedBorder(color: theme.colors.quinaryContent, borderWidth: 1.0, shape: backgroundShape)
.if(viewData.isCurrentSessionDisplayMode) { view in
view.onTapGesture {
onViewDetailsAction?(viewData.sessionId)
}
}
}
}