Fix history sidebar titles and delete handling
This commit is contained in:
parent
cc3e98ce26
commit
2e8c91abf8
10
main.go
10
main.go
|
|
@ -1428,6 +1428,14 @@ Config:
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *appState) deleteHistoryEntry(entry ui.HistoryEntry) {
|
func (s *appState) deleteHistoryEntry(entry ui.HistoryEntry) {
|
||||||
|
if entry.Status == queue.JobStatusRunning || entry.Status == queue.JobStatusPending {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
|
if s.jobQueue != nil {
|
||||||
|
_ = s.jobQueue.Remove(entry.ID)
|
||||||
|
}
|
||||||
|
|
||||||
// Remove entry from history
|
// Remove entry from history
|
||||||
var updated []ui.HistoryEntry
|
var updated []ui.HistoryEntry
|
||||||
for _, e := range s.historyEntries {
|
for _, e := range s.historyEntries {
|
||||||
|
|
@ -1444,7 +1452,7 @@ func (s *appState) deleteHistoryEntry(entry ui.HistoryEntry) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refresh main menu to update sidebar
|
// Refresh main menu to update sidebar
|
||||||
s.showMainMenu()
|
s.refreshMainMenuThrottled()
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *appState) stopPreview() {
|
func (s *appState) stopPreview() {
|
||||||
|
|
|
||||||
|
|
@ -635,7 +635,7 @@ func (s *appState) createThumbJobForPath(path string) *queue.Job {
|
||||||
|
|
||||||
return &queue.Job{
|
return &queue.Job{
|
||||||
Type: queue.JobTypeThumb,
|
Type: queue.JobTypeThumb,
|
||||||
Title: "Thumbnails: " + filepath.Base(path),
|
Title: filepath.Base(path),
|
||||||
Description: description,
|
Description: description,
|
||||||
InputFile: path,
|
InputFile: path,
|
||||||
OutputFile: outputFile,
|
OutputFile: outputFile,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user