mirror of
https://github.com/correl/doom-modeline.git
synced 2024-11-24 03:00:10 +00:00
Ignore errors in fetching github notifications with network issue.
This commit is contained in:
parent
7285c433ae
commit
47bed3c0a4
1 changed files with 6 additions and 5 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Vincent Zhang <seagle0128@gmail.com>
|
;; Author: Vincent Zhang <seagle0128@gmail.com>
|
||||||
;; Homepage: https://github.com/seagle0128/doom-modeline
|
;; Homepage: https://github.com/seagle0128/doom-modeline
|
||||||
;; Version: 1.4.2
|
;; Version: 1.4.3
|
||||||
;; Package-Requires: ((emacs "25.1") (all-the-icons "1.0.0") (shrink-path "0.2.0") (eldoc-eval "0.1") (dash "2.11.0"))
|
;; Package-Requires: ((emacs "25.1") (all-the-icons "1.0.0") (shrink-path "0.2.0") (eldoc-eval "0.1") (dash "2.11.0"))
|
||||||
;; Keywords: faces mode-line
|
;; Keywords: faces mode-line
|
||||||
|
|
||||||
|
@ -1850,10 +1850,11 @@ mouse-3: Describe current input method")
|
||||||
(require 'ghub nil t)
|
(require 'ghub nil t)
|
||||||
(when (fboundp 'ghub-get)
|
(when (fboundp 'ghub-get)
|
||||||
(with-timeout (10)
|
(with-timeout (10)
|
||||||
(ghub-get "/notifications"
|
(ignore-errors
|
||||||
nil
|
(ghub-get "/notifications"
|
||||||
:query '((notifications . "true"))
|
nil
|
||||||
:noerror t))))
|
:query '((notifications . "true"))
|
||||||
|
:noerror t)))))
|
||||||
(lambda (result)
|
(lambda (result)
|
||||||
(setq doom-modeline--github-notifications-number
|
(setq doom-modeline--github-notifications-number
|
||||||
(length result))))))
|
(length result))))))
|
||||||
|
|
Loading…
Reference in a new issue