Merge pull request #2330 from seanfarley/smf/indexing-refresh-main

mu4e-main: automatically update the mail counts after indexing
This commit is contained in:
Dirk-Jan C. Binnema 2022-09-14 23:06:39 +03:00 committed by GitHub
commit e23c378d01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -118,7 +118,8 @@ the personal addresses.")
(mu4e-context-minor-mode)
(mu4e-search-minor-mode)
(mu4e-update-minor-mode)
(set (make-local-variable 'revert-buffer-function) #'mu4e--main-view-real))
(set (make-local-variable 'revert-buffer-function) #'mu4e--main-view-real)
(add-hook 'mu4e-index-updated-hook #'mu4e--main-update-after-index))
(defun mu4e--main-action-str (str &optional func-or-shortcut)
@ -417,5 +418,10 @@ When REFRESH is non nil refresh infos from server."
(sit-for 1)
(mu4e--main-menu))))
(defun mu4e--main-update-after-index ()
"Update the main view buffer after indexing."
(with-current-buffer mu4e-main-buffer-name
(revert-buffer)))
(provide 'mu4e-main)
;;; mu4e-main.el ends here