mirror of
https://github.com/vale981/ement.el
synced 2025-03-04 17:01:39 -05:00
Fix: Only show tip on initial sync
This commit is contained in:
parent
210543b9bd
commit
fe11c4b1a7
2 changed files with 7 additions and 2 deletions
|
@ -46,7 +46,8 @@
|
|||
hostname port)
|
||||
|
||||
(cl-defstruct ement-session
|
||||
user server token transaction-id rooms next-batch device-id initial-device-display-name)
|
||||
user server token transaction-id rooms next-batch
|
||||
device-id initial-device-display-name has-synced-p)
|
||||
|
||||
(cl-defstruct ement-room
|
||||
id display-name prev-batch
|
||||
|
|
6
ement.el
6
ement.el
|
@ -259,7 +259,11 @@ Runs `ement-sync-callback-hook' with SESSION."
|
|||
(mapc (apply-partially #'ement--push-joined-room-events session) joined-rooms)
|
||||
(setf (ement-session-next-batch session) next-batch)
|
||||
(run-hook-with-args 'ement-sync-callback-hook session)
|
||||
(message "Ement: Sync done. Use command `ement-view-room' to view a room.")))
|
||||
(message (concat "Ement: Sync done."
|
||||
(unless (ement-session-has-synced-p session)
|
||||
;; Show tip after initial sync.
|
||||
(setf (ement-session-has-synced-p session) t)
|
||||
" Use command `ement-view-room' to view a room.")))))
|
||||
|
||||
(defun ement--auto-sync (session)
|
||||
"If `ement-auto-sync' is non-nil, sync SESSION again."
|
||||
|
|
Loading…
Add table
Reference in a new issue