Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Thunderbird/images/   (Thunderbird Version 5.6©)  Datei vom 22.9.2026 mit Größe 68 kB image not shown  

Quelle  SafeRestorePresenting.swift   Sprache: JAVA

 

import Foundation
import MBProgressHUD
import UIKit

// MARK: - SafeRestorePresenting

/// The outcome of a Safe restore, as far as the screen that started it is concerned.
///
/// `OnboardingCoordinator` drives the restore and reports back through this, so it does not have to reach
/// into `RestoreSafeViewController`'s view for the progress indicator. That also keeps the restore
/// orchestration testable: `RestoreSafeViewController` comes from the `CreateID` storyboard.
@MainActor
protocol SafeRestorePresenting: AnyObject {

    /// Hides the progress indicator and re-enables interaction.
    func safeRestoreDidFinish()

    /// Reports the failure to the user. Also hides the progress indicator.
    func safeRestoreDidFail(with error: Error)
}

// MARK: - RestoreSafeViewController + SafeRestorePresenting

extension RestoreSafeViewController: SafeRestorePresenting {

    func safeRestoreDidFinish() {
        MBProgressHUD.hide(for: view, animated: true)
        view.isUserInteractionEnabled = true
    }

    func safeRestoreDidFail(with error: Error) {
        // `showAlert(for:)` already hides the progress indicator and re-enables interaction.
        showAlert(for: error)
    }
}

Messung
CHZG
839310092

¤ Dauer der Verarbeitung: 0.0 Sekunden  (vorverarbeitet am  2026-11-24) ¤

*© Formatika GbR, Deutschland