From b9ebcea82c262dc834633c2c8f44a94fe8773a15 Mon Sep 17 00:00:00 2001 From: Ed Zynda Date: Fri, 23 May 2025 14:43:30 +0300 Subject: really disable history nav when completions dialog is open (#50) --- internal/app/app.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/app') diff --git a/internal/app/app.go b/internal/app/app.go index 943f1b24e..41070684e 100644 --- a/internal/app/app.go +++ b/internal/app/app.go @@ -43,6 +43,7 @@ type App struct { // UI state filepickerOpen bool + completionDialogOpen bool } func New(ctx context.Context, conn *sql.DB) (*App, error) { @@ -141,6 +142,16 @@ func (app *App) SetFilepickerOpen(open bool) { app.filepickerOpen = open } +// IsCompletionDialogOpen returns whether the completion dialog is currently open +func (app *App) IsCompletionDialogOpen() bool { + return app.completionDialogOpen +} + +// SetCompletionDialogOpen sets the state of the completion dialog +func (app *App) SetCompletionDialogOpen(open bool) { + app.completionDialogOpen = open +} + // Shutdown performs a clean shutdown of the application func (app *App) Shutdown() { // Cancel all watcher goroutines -- cgit v1.2.3