mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Key backup returns (#1951)
* Converge on UserSessionFlowCoordinator logout confirmation * Add logout confirmation screen strings to untranslated. * Fix chat backup learn more URl fragment. * Implement logout flows that check recovery and key backup for the last session * Move logout confirmation screen strings to localazy * Change encrypted timeline item copy to "Waiting for decryption key" * Use different encrypted history banner based on key backup states * Introduce a SettingsFlowCoordinator and implement navigation directly to the secure backup screen from the logout flows. * Fix **mocked** secure backup controller flows * Simplify encrypted history banner logic * Address PR comments
This commit is contained in:
+9
-3
@@ -24,7 +24,7 @@ struct EncryptedHistoryRoomTimelineView: View {
|
||||
|
||||
var body: some View {
|
||||
Label {
|
||||
Text(L10n.screenRoomEncryptedHistoryBanner)
|
||||
Text(title)
|
||||
.font(.compound.bodyMDSemibold)
|
||||
.foregroundColor(.compound.textInfoPrimary)
|
||||
} icon: {
|
||||
@@ -43,6 +43,10 @@ struct EncryptedHistoryRoomTimelineView: View {
|
||||
.padding(.horizontal, 8)
|
||||
.padding(.vertical, 16)
|
||||
}
|
||||
|
||||
private var title: String {
|
||||
timelineItem.isSessionVerified ? L10n.screenRoomEncryptedHistoryBanner : L10n.screenRoomEncryptedHistoryBannerUnverified
|
||||
}
|
||||
}
|
||||
|
||||
private struct EncryptedHistoryLabelStyle: LabelStyle {
|
||||
@@ -56,7 +60,9 @@ private struct EncryptedHistoryLabelStyle: LabelStyle {
|
||||
|
||||
struct EncryptedHistoryRoomTimelineView_Previews: PreviewProvider, TestablePreview {
|
||||
static var previews: some View {
|
||||
let item = EncryptedHistoryRoomTimelineItem(id: .random)
|
||||
EncryptedHistoryRoomTimelineView(timelineItem: item)
|
||||
VStack {
|
||||
EncryptedHistoryRoomTimelineView(timelineItem: .init(id: .random, isSessionVerified: true))
|
||||
EncryptedHistoryRoomTimelineView(timelineItem: .init(id: .random, isSessionVerified: false))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user