Reduce time to minimum time

This commit is contained in:
neoarz 2025-03-27 22:52:35 -04:00
parent 858f3ff423
commit 7f09e614d2
2 changed files with 4 additions and 5 deletions

View file

@ -160,11 +160,10 @@ struct HomeView: View {
startHeartbeatInBackground()
// Create timer to update progress instead of sleeping
let progressTimer = Timer.scheduledTimer(withTimeInterval: 0.1, repeats: true) { timer in
let progressTimer = Timer.scheduledTimer(withTimeInterval: 0.05, repeats: true) { timer in
DispatchQueue.main.async {
// Increment progress
if importProgress < 1.0 {
importProgress += 0.05
importProgress += 0.25
} else {
timer.invalidate()
isImportingFile = false

View file

@ -215,10 +215,10 @@ struct SettingsView: View {
importProgress = 0.0
}
let progressTimer = Timer.scheduledTimer(withTimeInterval: 0.1, repeats: true) { timer in
let progressTimer = Timer.scheduledTimer(withTimeInterval: 0.05, repeats: true) { timer in
DispatchQueue.main.async {
if importProgress < 1.0 {
importProgress += 0.05
importProgress += 0.25
} else {
timer.invalidate()
isImportingFile = false