Removed "Do not ask again" button

This commit is contained in:
paleksandrs 2022-11-07 10:38:46 +02:00
parent 55dca0eb45
commit 7c310495d6
3 changed files with 2 additions and 18 deletions

View file

@ -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

View file

@ -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() {

View file

@ -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