mirror of
https://github.com/tw93/Mole.git
synced 2026-02-11 18:14:01 +00:00
Fix the problem of calculating the size after deletion
This commit is contained in:
BIN
bin/analyze-go
BIN
bin/analyze-go
Binary file not shown.
@@ -399,6 +399,13 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||||||
}
|
}
|
||||||
// Refresh the view
|
// Refresh the view
|
||||||
m.scanning = true
|
m.scanning = true
|
||||||
|
// Reset scan counters for rescan
|
||||||
|
atomic.StoreInt64(m.filesScanned, 0)
|
||||||
|
atomic.StoreInt64(m.dirsScanned, 0)
|
||||||
|
atomic.StoreInt64(m.bytesScanned, 0)
|
||||||
|
if m.currentPath != nil {
|
||||||
|
*m.currentPath = ""
|
||||||
|
}
|
||||||
return m, tea.Batch(m.scanCmd(m.path), tickCmd())
|
return m, tea.Batch(m.scanCmd(m.path), tickCmd())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -614,6 +621,13 @@ func (m model) updateKey(msg tea.KeyMsg) (tea.Model, tea.Cmd) {
|
|||||||
case "r":
|
case "r":
|
||||||
m.status = "Refreshing..."
|
m.status = "Refreshing..."
|
||||||
m.scanning = true
|
m.scanning = true
|
||||||
|
// Reset scan counters for refresh
|
||||||
|
atomic.StoreInt64(m.filesScanned, 0)
|
||||||
|
atomic.StoreInt64(m.dirsScanned, 0)
|
||||||
|
atomic.StoreInt64(m.bytesScanned, 0)
|
||||||
|
if m.currentPath != nil {
|
||||||
|
*m.currentPath = ""
|
||||||
|
}
|
||||||
return m, tea.Batch(m.scanCmd(m.path), tickCmd())
|
return m, tea.Batch(m.scanCmd(m.path), tickCmd())
|
||||||
case "l":
|
case "l":
|
||||||
m.showLargeFiles = !m.showLargeFiles
|
m.showLargeFiles = !m.showLargeFiles
|
||||||
|
|||||||
Reference in New Issue
Block a user