summaryrefslogtreecommitdiff
path: root/internal/gui/navigation_handler.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/gui/navigation_handler.go')
-rw-r--r--internal/gui/navigation_handler.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/internal/gui/navigation_handler.go b/internal/gui/navigation_handler.go
index 7bc3976..5d79cd6 100644
--- a/internal/gui/navigation_handler.go
+++ b/internal/gui/navigation_handler.go
@@ -39,7 +39,9 @@ func (n *NavigationHandler) scanExistingWords() {
}
// updateNavigation updates the navigation button states based on the current
-// combined word list (existing words on disk + completed queue jobs).
+// combined word list (existing words on disk + completed queue jobs). It also
+// refreshes the card counter label ("Card X / N") so it stays in sync with the
+// current position.
func (n *NavigationHandler) updateNavigation() {
allWords := n.getAllAvailableWords()
@@ -61,6 +63,9 @@ func (n *NavigationHandler) updateNavigation() {
n.app.prevWordBtn.Disable()
n.app.nextWordBtn.Disable()
}
+
+ // Keep the counter label in sync with the updated index and total.
+ n.app.updateCardCounter(n.app.currentWordIndex, len(allWords))
}
// getAllAvailableWords returns all words from disk and completed queue jobs,