Add refresh keybinding

This commit is contained in:
Miguel de la Cruz 2022-06-01 11:40:09 +02:00
parent 067147c996
commit 538321926f

View file

@ -156,15 +156,6 @@ if the user is not present"
(let ((url (format "/channels/%s/posts" channel-id)))
(mattermost-request "GET" url)))
;; ToDo: define this better
(defvar mattermost-root-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "n") #'next-line)
(define-key map (kbd "p") #'previous-line)
(define-key map (kbd "q") #'bury-buffer)
map)
"The keymap for mattermost-root-mode")
(defun mattermost-insert-channel (channel)
"Inserts a channel button in the current buffer"
(let* ((channel-display-name (plist-get channel :display_name))
@ -198,6 +189,15 @@ if the user is not present"
(mattermost-root-mode)
(beginning-of-buffer)))
(defvar mattermost-root-mode-map
(let ((map (make-sparse-keymap)))
(define-key map (kbd "n") #'next-line)
(define-key map (kbd "p") #'previous-line)
(define-key map (kbd "q") #'bury-buffer)
(define-key map (kbd "g") #'show-root)
map)
"The keymap for mattermost-root-mode")
(define-derived-mode mattermost-root-mode fundamental-mode "Mattermost Root"
"Mode to list the Mattermost teams and channels to allow the
user to check their status and select between them")