@@ -125,6 +125,7 @@ func (m *s3hubListBucketModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
125
125
}
126
126
m .sum = len (m .targetBuckets ) + 1
127
127
m .status = statusDownloading
128
+ m .index = 0 // Initialize index to 0 to accurately represent the starting state of progress.
128
129
progressCmd := m .progress .SetPercent (float64 (m .index ) / float64 (m .sum - 1 ))
129
130
130
131
return m , tea .Batch (
@@ -141,6 +142,7 @@ func (m *s3hubListBucketModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
141
142
}
142
143
m .sum = len (m .targetBuckets ) + 1
143
144
m .status = statusBucketDeleting
145
+ m .index = 0 // Initialize index to 0 to accurately represent the starting state of progress.
144
146
progressCmd := m .progress .SetPercent (float64 (m .index ) / float64 (m .sum - 1 ))
145
147
146
148
return m , tea .Batch (m .spinner .Tick ,
@@ -443,6 +445,7 @@ func (m *s3hubListS3ObjectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
443
445
}
444
446
m .sum = len (m .targetS3Keys ) + 1
445
447
m .status = statusDownloading
448
+ m .index = 0 // Initialize index to 0 to accurately represent the starting state of progress.
446
449
447
450
progressCmd := m .progress .SetPercent (float64 (m .index ) / float64 (m .sum - 1 ))
448
451
return m , tea .Batch (m .spinner .Tick ,
@@ -458,6 +461,7 @@ func (m *s3hubListS3ObjectModel) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
458
461
}
459
462
m .sum = len (m .targetS3Keys ) + 1
460
463
m .status = statusS3ObjectDeleting
464
+ m .index = 0 // Initialize index to 0 to accurately represent the starting state of progress.
461
465
462
466
progressCmd := m .progress .SetPercent (float64 (m .index ) / float64 (m .sum - 1 ))
463
467
return m , tea .Batch (m .spinner .Tick ,
0 commit comments