feat(rss): only call elfeed if necessary

If our *rss* workspace is already populated by elfeed buffers, there is
no reason to re-initialize elfeed.
This commit is contained in:
Antonio Ruiz 2022-08-31 14:40:54 -04:00 committed by Henrik Lissner
parent 3f9e62dab7
commit 6fc1aa9c62

View file

@ -9,8 +9,13 @@
(if (modulep! :ui workspaces)
(progn
(+workspace-switch +rss-workspace-name t)
(unless (memq (buffer-local-value 'major-mode
(window-buffer
(selected-window)))
'(elfeed-show-mode
elfeed-search-mode))
(doom/switch-to-scratch-buffer)
(elfeed)
(elfeed))
(+workspace/display))
(setq +rss--wconf (current-window-configuration))
(delete-other-windows)