Check for wellknown and account data flag

This commit is contained in:
Arnfried Griesert
2024-02-27 07:36:51 +01:00
parent 5cf6f10390
commit 5025925d3a
7 changed files with 125 additions and 16 deletions
@@ -80,14 +80,23 @@ struct DeveloperSettingsView: View {
.foregroundColor(Color(ThemeService.shared().theme.tintColor))
.font(.system(size: 17))
}
}
SwiftUI.Section(header: Text(BWIL10n.bwiSettingsDeveloperIntroduceFederation)) {
Button(action: { showIntroduceFederation = true }) {
Text(BWIL10n.bwiSettingsDeveloperIntroduceFederation)
Text(BWIL10n.bwiSettingsDeveloperIntroduceFederationPreview)
.foregroundColor(Color(ThemeService.shared().theme.tintColor))
.font(.system(size: 17))
}
.sheet(isPresented: $showIntroduceFederation) {
IntroduceFederationView()
.interactiveDismissDisabled()
.interactiveDismissDisabled()
}
if let session = session {
Button(action: { BWIAccountNotificationService(mxSession: session).setShowFederationIntroductionFlag(true) }) {
Text(BWIL10n.bwiSettingsDeveloperIntroduceFederationReset)
.foregroundColor(Color(ThemeService.shared().theme.tintColor))
.font(.system(size: 17))
}
}
}
if BWIBuildSettings.shared.permalinkPrefixSettings && !BWIBuildSettings.shared.permalinkPrefixes.isEmpty {
@@ -139,12 +148,12 @@ struct DeveloperSettingsView: View {
}
@available(iOS 14.0, *)
struct DeveloperSettingsView_Previews: PreviewProvider {
static var previews: some View {
DeveloperSettingsView(session: nil)
}
}
//@available(iOS 14.0, *)
//struct DeveloperSettingsView_Previews: PreviewProvider {
// static var previews: some View {
// DeveloperSettingsView(session: nil)
// }
//}
// MARK: - Button Actions