From c3f879b379f860f7d52fba5babc861855755efee Mon Sep 17 00:00:00 2001 From: Maxim Slipenko Date: Sun, 26 Jan 2025 17:11:25 +0300 Subject: [PATCH] fix: quit after done in progress --- internal/dl/progress_tui.go | 1 + internal/translations/default.pot | 4 ++-- internal/translations/po/ru/default.po | 4 ++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/internal/dl/progress_tui.go b/internal/dl/progress_tui.go index 9e9f17e..e059848 100644 --- a/internal/dl/progress_tui.go +++ b/internal/dl/progress_tui.go @@ -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: diff --git a/internal/translations/default.pot b/internal/translations/default.pot index a52bd8d..dfaf967 100644 --- a/internal/translations/default.pot +++ b/internal/translations/default.pot @@ -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 "" diff --git a/internal/translations/po/ru/default.po b/internal/translations/po/ru/default.po index cd43997..020acd8 100644 --- a/internal/translations/po/ru/default.po +++ b/internal/translations/po/ru/default.po @@ -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 ""