mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-27 11:09:52 +00:00
Fix #94: auth-source not initialized due to async.
This commit is contained in:
parent
8f48842dfe
commit
a99b3bfe10
1 changed files with 6 additions and 1 deletions
|
@ -1920,6 +1920,10 @@ mouse-3: Describe current input method")
|
||||||
;;
|
;;
|
||||||
|
|
||||||
(defvar doom-modeline--github-notifications-number 0)
|
(defvar doom-modeline--github-notifications-number 0)
|
||||||
|
(defvar doom-modeline-before-github-fetch-notification-hook nil
|
||||||
|
"Hooks before fetching github notifications.
|
||||||
|
Example:
|
||||||
|
(add-hook 'doom-modeline-before-github-fetch-notification-hook #'auth-source-pass-enable)")
|
||||||
(defun doom-modeline--github-fetch-notifications ()
|
(defun doom-modeline--github-fetch-notifications ()
|
||||||
"Fetch github notifications."
|
"Fetch github notifications."
|
||||||
(when (and doom-modeline-github
|
(when (and doom-modeline-github
|
||||||
|
@ -1929,7 +1933,8 @@ mouse-3: Describe current input method")
|
||||||
(require 'async nil t))
|
(require 'async nil t))
|
||||||
(async-start
|
(async-start
|
||||||
`(lambda ()
|
`(lambda ()
|
||||||
,(async-inject-variables "\\`load-path\\'")
|
,(async-inject-variables "\\`\\(load-path\\|auth-sources\\)\\'")
|
||||||
|
(run-hooks 'doom-modeline-before-github-fetch-notification-hook)
|
||||||
(require 'ghub nil t)
|
(require 'ghub nil t)
|
||||||
(when (fboundp 'ghub-get)
|
(when (fboundp 'ghub-get)
|
||||||
(with-timeout (10)
|
(with-timeout (10)
|
||||||
|
|
Loading…
Reference in a new issue