mirror of
https://github.com/vector-im/element-ios.git
synced 2024-09-28 23:32:41 +00:00
Removed "Do not ask again" button
This commit is contained in:
parent
55dca0eb45
commit
7c310495d6
3 changed files with 2 additions and 18 deletions
|
@ -200,9 +200,6 @@ final class RiotSettings: NSObject {
|
|||
@UserDefault(key: "hideVerifyThisSessionAlert", defaultValue: false, storage: defaults)
|
||||
var hideVerifyThisSessionAlert
|
||||
|
||||
@UserDefault(key: "hideReviewSessionsAlert", defaultValue: false, storage: defaults)
|
||||
var hideReviewSessionsAlert
|
||||
|
||||
@UserDefault(key: "matrixApps", defaultValue: false, storage: defaults)
|
||||
var matrixApps
|
||||
|
||||
|
|
|
@ -842,7 +842,7 @@ extension AllChatsViewController: SplitViewMasterViewControllerProtocol {
|
|||
/// - Parameters:
|
||||
/// - session: the matrix session.
|
||||
func presentReviewUnverifiedSessionsAlertIfNeeded(with session: MXSession) {
|
||||
guard !RiotSettings.shared.hideReviewSessionsAlert, !reviewSessionAlertHasBeenDisplayed else {
|
||||
guard !reviewSessionAlertHasBeenDisplayed else {
|
||||
return
|
||||
}
|
||||
|
||||
|
@ -1009,10 +1009,6 @@ extension AllChatsViewController: SplitViewMasterViewControllerProtocol {
|
|||
|
||||
alert.addAction(UIAlertAction(title: VectorL10n.later, style: .cancel))
|
||||
|
||||
alert.addAction(UIAlertAction(title: VectorL10n.doNotAskAgain, style: .destructive, handler: { action in
|
||||
RiotSettings.shared.hideReviewSessionsAlert = true
|
||||
}))
|
||||
|
||||
present(alert, animated: true)
|
||||
currentAlert = alert
|
||||
}
|
||||
|
@ -1055,7 +1051,6 @@ extension AllChatsViewController: SplitViewMasterViewControllerProtocol {
|
|||
private func resetReviewSessionsFlags() {
|
||||
reviewSessionAlertHasBeenDisplayed = false
|
||||
RiotSettings.shared.hideVerifyThisSessionAlert = false
|
||||
RiotSettings.shared.hideReviewSessionsAlert = false
|
||||
}
|
||||
|
||||
private func presentOnboardingFlow() {
|
||||
|
|
|
@ -903,7 +903,7 @@
|
|||
|
||||
- (void)presentReviewUnverifiedSessionsAlertIfNeededWithSession:(MXSession*)session
|
||||
{
|
||||
if (RiotSettings.shared.hideReviewSessionsAlert || self.reviewSessionAlertHasBeenDisplayed)
|
||||
if (self.reviewSessionAlertHasBeenDisplayed)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
@ -948,13 +948,6 @@
|
|||
style:UIAlertActionStyleCancel
|
||||
handler:nil]];
|
||||
|
||||
[alert addAction:[UIAlertAction actionWithTitle:[VectorL10n doNotAskAgain]
|
||||
style:UIAlertActionStyleDestructive
|
||||
handler:^(UIAlertAction * action) {
|
||||
RiotSettings.shared.hideReviewSessionsAlert = YES;
|
||||
}]];
|
||||
|
||||
|
||||
[self presentViewController:alert animated:YES completion:nil];
|
||||
|
||||
currentAlert = alert;
|
||||
|
@ -975,7 +968,6 @@
|
|||
{
|
||||
self.reviewSessionAlertHasBeenDisplayed = NO;
|
||||
RiotSettings.shared.hideVerifyThisSessionAlert = NO;
|
||||
RiotSettings.shared.hideReviewSessionsAlert = NO;
|
||||
}
|
||||
|
||||
#pragma mark - UITabBarDelegate
|
||||
|
|
Loading…
Reference in a new issue