Skip to content

Commit 46431eb

Browse files
committed
use apiflg in gist--check-perms-and-get-api
1 parent e421902 commit 46431eb

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

gist.el

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ Copies the URL into the kill ring."
296296
(lambda (gists)
297297
(with-current-buffer (get-buffer-create buffer)
298298
(setq gist-list-buffer-user username)
299-
(gist-lists-retrieved-callback gists username background)))))
299+
(gist-lists-retrieved-callback gists background)))))
300300
(gh-url-add-response-callback
301301
resp
302302
(lexical-let ((profile (oref api :profile))
@@ -320,15 +320,16 @@ Copies the URL into the kill ring."
320320
(repo (oref gist :id)))
321321
(list repo (apply 'vector data))))
322322

323-
(defun gist-lists-retrieved-callback (gists username &optional background)
323+
(defun gist-lists-retrieved-callback (gists &optional background)
324324
"Called when the list of gists has been retrieved. Displays
325325
the list."
326-
(dolist (g (gethash username gist-list-db-by-user))
326+
(dolist (g (gethash gist-list-buffer-user gist-list-db-by-user))
327327
(remhash (oref g :id) gist-list-db))
328328
(dolist (g gists)
329329
(puthash (oref g :id) g gist-list-db))
330-
(puthash username gists gist-list-db-by-user)
331-
(gist-list-render (gethash username gist-list-db-by-user) background))
330+
(puthash gist-list-buffer-user gists gist-list-db-by-user)
331+
(gist-list-render (gethash gist-list-buffer-user gist-list-db-by-user)
332+
background))
332333

333334
(defun gist--get-time (gist)
334335
(let* ((date (timezone-parse-date (oref gist :date)))
@@ -429,7 +430,7 @@ for the gist."
429430
(select-window win)))
430431

431432
(defun gist--check-perms-and-get-api (gist errormsg apiflg)
432-
(let* ((api (gist-get-api t))
433+
(let* ((api (gist-get-api apiflg))
433434
(username (gh-api-get-username api))
434435
(gs (gethash username gist-list-db-by-user)))
435436
(if (not (memq gist gs))

0 commit comments

Comments
 (0)