From d1db700ba17382d5591b18149dea72a0003469d9 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Thu, 14 Nov 2024 17:58:20 +0200 Subject: dashboard: Remove window deletion. --- gnosis.el | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'gnosis.el') diff --git a/gnosis.el b/gnosis.el index 35c01e7..e051180 100644 --- a/gnosis.el +++ b/gnosis.el @@ -509,8 +509,10 @@ Refer to =gnosis-db-schema-extras' for informations on images stored." ;; Only display images on graphical env (when (display-graphic-p) (let* ((img (gnosis-get image 'extras `(= id ,id))) - (path-to-image (expand-file-name (or img "") (file-name-as-directory gnosis-images-dir))) - (image (create-image path-to-image 'png nil :width gnosis-image-width :height gnosis-image-height)) + (path-to-image (expand-file-name (or img "") + (file-name-as-directory gnosis-images-dir))) + (image (create-image path-to-image 'png nil + :width gnosis-image-width :height gnosis-image-height)) (image-width (car (image-size image t))) (frame-width (window-text-width))) ;; Width of the current window in columns (cond ((or (not img) (string-empty-p img)) @@ -3006,7 +3008,9 @@ DASHBOARD-TYPE: either Notes or Decks to display the respective dashboard." (defun gnosis-dashboard () "Launch gnosis dashboard." (interactive) - (delete-other-windows) + ;; Refresh gnosis-db + (unless gnosis-testing + (setf gnosis-db (emacsql-sqlite-open (expand-file-name "gnosis.db" gnosis-dir)))) (let* ((buffer-name gnosis-dashboard-buffer-name) (due-log (gnosis-review-get--due-notes)) (due-note-ids (mapcar #'car due-log))) -- cgit v1.2.3