fix: quit after done in progress

This commit is contained in:
Maxim Slipenko 2025-01-26 17:11:25 +03:00
parent aa90dfa983
commit c3f879b379
3 changed files with 5 additions and 4 deletions

@ -68,6 +68,7 @@ func (m model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
m.remaining = time.Duration(msg.remaining) * time.Second
if m.percent >= 1.0 {
m.done = true
return m, tea.Quit
}
return m, nil
case tea.WindowSizeMsg:

@ -251,11 +251,11 @@ msgstr ""
msgid "Downloading source"
msgstr ""
#: internal/dl/progress_tui.go:99
#: internal/dl/progress_tui.go:100
msgid "%s: done!\n"
msgstr ""
#: internal/dl/progress_tui.go:103
#: internal/dl/progress_tui.go:104
msgid "%s %s downloading at %s/s\n"
msgstr ""

@ -263,11 +263,11 @@ msgstr "Источник обновлён и связан с пунктом на
msgid "Downloading source"
msgstr "Скачивание источника"
#: internal/dl/progress_tui.go:99
#: internal/dl/progress_tui.go:100
msgid "%s: done!\n"
msgstr ""
#: internal/dl/progress_tui.go:103
#: internal/dl/progress_tui.go:104
msgid "%s %s downloading at %s/s\n"
msgstr ""