really disable history nav when completions dialog is open (#50)

This commit is contained in:
Ed Zynda
2025-05-23 14:43:30 +03:00
committed by GitHub
parent f31f92119d
commit b9ebcea82c
3 changed files with 16 additions and 3 deletions

View File

@@ -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