Skip to content

Commit

Permalink
'backup' and 'add second device' do not longer have special values bu…
Browse files Browse the repository at this point in the history
…t use the whole range smoothly
  • Loading branch information
r10s committed Oct 5, 2024
1 parent 9be4429 commit 3c003a7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,13 +216,9 @@ class WelcomeViewController: UIViewController {
} else {
guard let permille = ui["progress"] as? Int else { return }
var statusLineText = ""
if permille <= 100 {
statusLineText = String.localized("preparing_account")
} else if permille <= 950 {
let percent = ((permille-100)*100)/850
if permille < 1000 {
let percent: Int = permille/10
statusLineText = String.localized("transferring") + " \(percent)%"
} else {
statusLineText = "Finishing..." // range not used, should not happen
}
progressAlertHandler.updateProgressAlert(message: statusLineText)
}
Expand Down
11 changes: 2 additions & 9 deletions deltachat-ios/Controller/BackupTransferViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -178,16 +178,9 @@ class BackupTransferViewController: UIViewController {
self.showLastErrorAlert("Error")
}
hideQrCode = true
} else if permille <= 350 {
statusLineText = nil
} else if permille <= 400 {
statusLineText = nil
} else if permille <= 450 {
statusLineText = String.localized("receiver_connected")
hideQrCode = true
} else if permille < 1000 {
let percent = (permille-450)/5
statusLineText = String.localized("transferring") + " \(percent)%" // TODO: use a scrollbar, show precide percentage only for receiver
let percent: Int = permille/10
statusLineText = String.localized("transferring") + " \(percent)%"
hideQrCode = true
} else if permille == 1000 {
self.transferState = TranferState.success
Expand Down

0 comments on commit 3c003a7

Please sign in to comment.