Display unred messages count

This commit is contained in:
Denis Zheleztsov 2018-08-12 12:36:30 +03:00
parent 748a566336
commit 2f63b9388d
2 changed files with 8 additions and 3 deletions

View File

@ -231,6 +231,7 @@ optionaly return cursor to CHECKPOINT."
(interactive) (interactive)
(with-output-to-temp-buffer (get-buffer-create "*IDEC: INBOX*") (with-output-to-temp-buffer (get-buffer-create "*IDEC: INBOX*")
(switch-to-buffer "*IDEC: INBOX*") (switch-to-buffer "*IDEC: INBOX*")
(insert "* LOCAL ECHOAREAS\n")
(save-excursion (save-excursion
(dolist (echo (get-local-echoes)) (dolist (echo (get-local-echoes))
(if echo (if echo
@ -246,7 +247,7 @@ optionaly return cursor to CHECKPOINT."
(setq start (point)) (setq start (point))
(end-of-line) (end-of-line)
(setq end (point)) (setq end (point))
(add-text-properties start end '(comment t face '(:foreground "light green"))) (put-text-property start end 'font-lock-face '(:foreground "light blue"))
(princ (concat (dots echo) (princ (concat (dots echo)
"(" "("
@ -269,7 +270,10 @@ optionaly return cursor to CHECKPOINT."
'action (lambda (x) (mark-all-as-read (button-get x 'echo) (button-get x 'point))) 'action (lambda (x) (mark-all-as-read (button-get x 'echo) (button-get x 'point)))
'echo echo 'echo echo
'point (point)) 'point (point))
(princ "]\n")) (princ "]")
(when (> unread 0)
(princ (concat " unread (" (number-to-string unread) ")")))
(princ "\n"))
(message (concat "IDEC: FUUUUUU <" echo ">"))))) (message (concat "IDEC: FUUUUUU <" echo ">")))))
(when checkpoint (when checkpoint
(goto-char checkpoint))) (goto-char checkpoint)))

View File

@ -91,7 +91,8 @@ put cursor to CHECKPOINT."
(idec-db-get-message-by-id (idec-db-get-message-by-id
(gethash "repto" (button-get x 'msg)) (gethash "repto" (button-get x 'msg))
(gethash "echo" (button-get x 'msg))))) (gethash "echo" (button-get x 'msg)))))
'msg msg) 'msg msg
'help-echo (concat "Jump to " (gethash "repto" msg)))
(insert (concat (gethash "author" msg) "[" (gethash "address" msg) "]"))) (insert (concat (gethash "author" msg) "[" (gethash "address" msg) "]")))
(insert "\n") (insert "\n")
(insert (concat "To: " (gethash "recipient" msg) "\n")) (insert (concat "To: " (gethash "recipient" msg) "\n"))