Fix 'Clear All' queue button to return to previous module

Changed 'Clear All' behavior to return to the last active module
instead of always going to main menu. Falls back to main menu
if no previous module is tracked or if coming from queue itself.
This commit is contained in:
Stu Leak 2025-12-17 00:57:01 -05:00
parent f653b2a4ce
commit 244ea04e5a

View File

@ -1126,8 +1126,12 @@ func (s *appState) refreshQueueView() {
func() { // onClearAll func() { // onClearAll
s.jobQueue.ClearAll() s.jobQueue.ClearAll()
s.clearVideo() s.clearVideo()
// Return to main menu after clearing everything to avoid dangling in queue // Return to previous module or main menu
s.showMainMenu() if s.lastModule != "" && s.lastModule != "queue" {
s.showModule(s.lastModule)
} else {
s.showMainMenu()
}
}, },
func(id string) { // onCopyError func(id string) { // onCopyError
job, err := s.jobQueue.Get(id) job, err := s.jobQueue.Get(id)