mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-23 19:19:50 +00:00
Fix hang issue in fetching github notifications.
If there is no github access token, ghub requires to create and save from minibuffer, thus will cause hang in async process. Just ignore it if no token.
This commit is contained in:
parent
a01d39b2e7
commit
f2f7aaf392
1 changed files with 8 additions and 4 deletions
|
@ -1853,10 +1853,14 @@ mouse-3: Describe current input method")
|
|||
(when (fboundp 'ghub-get)
|
||||
(with-timeout (10)
|
||||
(ignore-errors
|
||||
(ghub-get "/notifications"
|
||||
nil
|
||||
:query '((notifications . "true"))
|
||||
:noerror t)))))
|
||||
(if (ghub--token ghub-default-host
|
||||
(ghub--username ghub-default-host)
|
||||
'ghub
|
||||
t)
|
||||
(ghub-get "/notifications"
|
||||
nil
|
||||
:query '((notifications . "true"))
|
||||
:noerror t))))))
|
||||
(lambda (result)
|
||||
(setq doom-modeline--github-notifications-number
|
||||
(length result))))))
|
||||
|
|
Loading…
Reference in a new issue