Add refresh keybinding
This commit is contained in:
parent
067147c996
commit
538321926f
1 changed files with 9 additions and 9 deletions
|
@ -156,15 +156,6 @@ if the user is not present"
|
||||||
(let ((url (format "/channels/%s/posts" channel-id)))
|
(let ((url (format "/channels/%s/posts" channel-id)))
|
||||||
(mattermost-request "GET" url)))
|
(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)
|
(defun mattermost-insert-channel (channel)
|
||||||
"Inserts a channel button in the current buffer"
|
"Inserts a channel button in the current buffer"
|
||||||
(let* ((channel-display-name (plist-get channel :display_name))
|
(let* ((channel-display-name (plist-get channel :display_name))
|
||||||
|
@ -198,6 +189,15 @@ if the user is not present"
|
||||||
(mattermost-root-mode)
|
(mattermost-root-mode)
|
||||||
(beginning-of-buffer)))
|
(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"
|
(define-derived-mode mattermost-root-mode fundamental-mode "Mattermost Root"
|
||||||
"Mode to list the Mattermost teams and channels to allow the
|
"Mode to list the Mattermost teams and channels to allow the
|
||||||
user to check their status and select between them")
|
user to check their status and select between them")
|
||||||
|
|
Loading…
Reference in a new issue