Skip to content

Commit

Permalink
ui: animation delay for less scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
reez authored Nov 9, 2024
1 parent 5c8b813 commit 9b2542f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions BDKSwiftExampleWallet/View Model/WalletViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,18 @@ class WalletSyncScriptInspector: SyncScriptInspector {
func inspect(script: Script, total: UInt64) {
totalCount = total
inspectedCount += 1

let delay: TimeInterval =
if total <= 5 {
0.2
} else if total < 10 {
0.15
} else if total < 20 {
0.1
} else {
0
}
Thread.sleep(forTimeInterval: delay)
updateProgress(inspectedCount, totalCount)
}
}
Expand Down

0 comments on commit 9b2542f

Please sign in to comment.