Fix: checking github notifications asynchronously.

This commit is contained in:
Vincent Zhang 2018-12-25 02:14:42 +08:00
parent f4d9aabcd6
commit ff63959c03

View file

@ -1562,10 +1562,12 @@ mouse-3: Describe current input method")
(fboundp 'async-start)
(fboundp 'ghub-get))
(async-start
(setq doom-modeline--github-notifications-number
(length
(ignore-errors
(ghub-get "/notifications" nil :query '((notifications . "true")))))))))
(lambda ()
(ignore-errors
(ghub-get "/notifications" nil :query '((notifications . "true")))))
(lambda (result)
(setq doom-modeline--github-notifications-number
(length result))))))
(run-with-timer 30
doom-modeline-github-interval