     private var viewModel: SettingsKeyBackupViewModelType!
 
     // Need to know the state to make `cellForRow` deliver cells accordingly
-    private var viewState: SettingsKeyBackupViewState = .checkingBackup
+    private var viewState: SettingsKeyBackupViewState = .checkingBackup {
+        didSet {
+            self.updateBackupRows()
+        }
+    }
 
     private var userDevice: MXDeviceInfo
+    
+    private var backupRows: [BackupRows] = []
 
     // MARK: - Public
 

    func settingsKeyBackup(_ settingsKeyBackupTableViewSection: SettingsKeyBackupTableViewSection, showError error: Error)
}

@objc final class SettingsKeyBackupTableViewSection: NSObject {

    // MARK: - Properties


        self.viewModel.process(viewAction: .load)
    }
    
    @objc func numberOfRows() -> Int {
        return self.backupRows.count
    }
    
    @objc func cellForRow(atRow row: Int) -> UITableViewCell {
        guard let delegate = self.delegate else {
            return UITableViewCell()
        }
        
        let backupRow = self.backupRows[row]
        
        var cell: UITableViewCell
        switch backupRow {
        case .info(let infoText):
            let infoCell: MXKTableViewCellWithTextView = delegate.settingsKeyBackupTableViewSection(self, textCellForRow: row)
            infoCell.mxkTextView.text = infoText
            cell = infoCell
        case .createAction:
            cell = self.buttonCellForCreate(atRow: row)
        case .restoreAction(keyBackupVersion: let keyBackupVersion):
            cell = self.buttonCellForRestore(keyBackupVersion: keyBackupVersion, atRow: row)
        case .deleteAction(keyBackupVersion: let keyBackupVersion):
            cell = self.buttonCellForDelete(keyBackupVersion: keyBackupVersion, atRow: row)
        }
        
        return cell
    }

    @objc func reload() {
        self.viewModel.process(viewAction: .load)
    }

    @objc func delete(keyBackupVersion: MXKeyBackupVersion) {
        self.viewModel.process(viewAction: .delete(keyBackupVersion))
    }

    // MARK: - Data Computing
    
    private func updateBackupRows() {
        
        let backupRows: [BackupRows]
        
        switch self.viewState {
        case .checkingBackup:
            
            let info = VectorL10n.settingsKeyBackupInfo
            let checking = VectorL10n.settingsKeyBackupInfoChecking
            let strings = [info, "", checking]
            let text = strings.joined(separator: "\n")
            
            backupRows = [
                .info(text: text)
            ]
            
        case .noBackup:
            
            let noBackup = VectorL10n.settingsKeyBackupInfoNone
            let info = VectorL10n.settingsKeyBackupInfo
            let signoutWarning = VectorL10n.settingsKeyBackupInfoSignoutWarning
            let strings = [noBackup, "", info, "", signoutWarning]
            let backupInfoText = strings.joined(separator: "\n")
            
            backupRows = [
                .info(text: backupInfoText),
                .createAction
            ]
            
        case .backup(let keyBackupVersion, let keyBackupVersionTrust):
            
            let info = VectorL10n.settingsKeyBackupInfo
            let backupStatus = VectorL10n.settingsKeyBackupInfoValid
            let backupStrings = [info, "", backupStatus]
            let backupInfoText = backupStrings.joined(separator: "\n")
            
            let version = VectorL10n.settingsKeyBackupInfoVersion(keyBackupVersion.version ?? "")
            let algorithm = VectorL10n.settingsKeyBackupInfoAlgorithm(keyBackupVersion.algorithm)
            let uploadStatus = VectorL10n.settingsKeyBackupInfoProgressDone
            let additionalStrings = [version, algorithm, uploadStatus]
            let additionalInfoText = additionalStrings.joined(separator: "\n")
            
            let backupTrust = self.stringForKeyBackupTrust(keyBackupVersionTrust)
            let backupTrustInfoText = backupTrust.joined(separator: "\n")
            
            var backupViewStateRows: [BackupRows] = [
                .info(text: backupInfoText),
                .info(text: additionalInfoText),
                .info(text: backupTrustInfoText)
            ]
            
            // TODO: Do not display restore button if all keys are stored on the device
            if true {
                backupViewStateRows.append(.restoreAction(keyBackupVersion: keyBackupVersion))
            }
            
            backupViewStateRows.append(.deleteAction(keyBackupVersion: keyBackupVersion))
            
            backupRows = backupViewStateRows
            
        case .backupAndRunning(let keyBackupVersion, let keyBackupVersionTrust, let backupProgress):
            
            let info = VectorL10n.settingsKeyBackupInfo
            let backupStatus = VectorL10n.settingsKeyBackupInfoValid
            let backupStrings = [info, "", backupStatus]
            let backupInfoText = backupStrings.joined(separator: "\n")
            
            let remaining = backupProgress.totalUnitCount - backupProgress.completedUnitCount
            let version = VectorL10n.settingsKeyBackupInfoVersion(keyBackupVersion.version ?? "")
            let algorithm = VectorL10n.settingsKeyBackupInfoAlgorithm(keyBackupVersion.algorithm)
            let uploadStatus = VectorL10n.settingsKeyBackupInfoProgress(String(remaining))
            let additionalStrings = [version, algorithm, uploadStatus]
            let additionalInfoText = additionalStrings.joined(separator: "\n")
            
            let backupTrust = self.stringForKeyBackupTrust(keyBackupVersionTrust)
            let backupTrustInfoText = backupTrust.joined(separator: "\n")
            
            var backupAndRunningViewStateRows: [BackupRows] = [
                .info(text: backupInfoText),
                .info(text: additionalInfoText),
                .info(text: backupTrustInfoText)
            ]
            
            // TODO: Do not display restore button if all keys are stored on the device
            if true {
                backupAndRunningViewStateRows.append(.restoreAction(keyBackupVersion: keyBackupVersion))
            }
            
            backupAndRunningViewStateRows.append(.deleteAction(keyBackupVersion: keyBackupVersion))
            
            backupRows = backupAndRunningViewStateRows
            
        case .backupNotTrusted(let keyBackupVersion, let keyBackupVersionTrust):
            
            let info = VectorL10n.settingsKeyBackupInfo
            let backupStatus = VectorL10n.settingsKeyBackupInfoNotValid
            let signoutWarning = VectorL10n.settingsKeyBackupInfoSignoutWarning
            let backupStrings = [info, "", backupStatus, "", signoutWarning]
            let backupInfoText = backupStrings.joined(separator: "\n")
            
            let version = VectorL10n.settingsKeyBackupInfoVersion(keyBackupVersion.version ?? "")
            let algorithm = VectorL10n.settingsKeyBackupInfoAlgorithm(keyBackupVersion.algorithm)
            let additionalStrings = [version, algorithm]
            let additionalInfoText = additionalStrings.joined(separator: "\n")
            
            let backupTrust = self.stringForKeyBackupTrust(keyBackupVersionTrust)
            let backupTrustInfoText = backupTrust.joined(separator: "\n")
            
            var backupNotTrustedViewStateRows: [BackupRows] = [
                .info(text: backupInfoText),
                .info(text: additionalInfoText),
                .info(text: backupTrustInfoText)
            ]
            
            // TODO: Do not display restore button if all keys are stored on the device
            if true {
                backupNotTrustedViewStateRows.append(.restoreAction(keyBackupVersion: keyBackupVersion))
            }
            
            backupNotTrustedViewStateRows.append(.deleteAction(keyBackupVersion: keyBackupVersion))
            
            backupRows = backupNotTrustedViewStateRows
        }
        
        self.backupRows = backupRows
    }

    private func stringForKeyBackupTrust(_ keyBackupVersionTrust: MXKeyBackupVersionTrust) -> [String] {

