MESSENGER-2762 Initial Merge

This commit is contained in:
Frank Rotermund
2022-03-17 15:51:23 +01:00
parent ecae8d618f
commit c2108a2178
384 changed files with 17708 additions and 1928 deletions

View File

@@ -1,5 +1,6 @@
/*
Copyright 2020 New Vector Ltd
Copyright (c) 2021 BWI GmbH
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -86,11 +87,16 @@ final class SecretsRecoveryWithKeyViewController: UIViewController {
// MARK: - Private
private func setupViews() {
let cancelBarButtonItem = MXKBarButtonItem(title: VectorL10n.cancel, style: .plain) { [weak self] in
self?.cancelButtonAction()
}
self.navigationItem.rightBarButtonItem = cancelBarButtonItem
if let session = AppDelegate.theDelegate().mxSessions.first as? MXSession {
if !session.homeserverWellknown.backupRequired() {
let cancelBarButtonItem = MXKBarButtonItem(title: VectorL10n.cancel, style: .plain) { [weak self] in
self?.cancelButtonAction()
}
self.navigationItem.rightBarButtonItem = cancelBarButtonItem
}
}
self.title = VectorL10n.secretsRecoveryWithKeyTitle
self.scrollView.keyboardDismissMode = .interactive
@@ -151,11 +157,7 @@ final class SecretsRecoveryWithKeyViewController: UIViewController {
// Reset secrets button
let resetSecretsAttributedString = NSMutableAttributedString(string: VectorL10n.secretsRecoveryResetActionPart1, attributes: [.foregroundColor: self.theme.textPrimaryColor])
let resetSecretsAttributedStringPart2 = NSAttributedString(string: VectorL10n.secretsRecoveryResetActionPart2, attributes: [.foregroundColor: self.theme.warningColor])
resetSecretsAttributedString.append(resetSecretsAttributedStringPart2)
let resetSecretsAttributedString = NSMutableAttributedString(string: VectorL10n.secretsRecoveryResetActionPart1, attributes: [.foregroundColor: self.theme.tintColor])
self.resetSecretsButton.setAttributedTitle(resetSecretsAttributedString, for: .normal)
}