Skip to content

Commit

Permalink
Do not render a timeline for a killed buffer.
Browse files Browse the repository at this point in the history
* twittering-mode.el (twittering-get-buffer-from-spec): return nil
if the corresponding buffer has been already killed.
(twittering-update-unread-status-info): do not count statuses for
a killed buffer.
(twittering-http-get-default-sentinel): do not render a timeline
for a killed buffer.
  • Loading branch information
cvmat committed Apr 18, 2010
1 parent aee1827 commit 15759bc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
@@ -1,3 +1,12 @@
2010-04-19 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el (twittering-get-buffer-from-spec): return nil
if the corresponding buffer has been already killed.
(twittering-update-unread-status-info): do not count statuses for
a killed buffer.
(twittering-http-get-default-sentinel): do not render a timeline
for a killed buffer.

2010-04-17 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Reimplement support of multiple buffers. The
Expand Down
6 changes: 3 additions & 3 deletions twittering-mode.el
Expand Up @@ -1351,7 +1351,7 @@ return nil."
(twittering-get-timeline-spec-string-for-buffer buffer))
buffer
nil))
twittering-buffer-info-list))))
(twittering-get-buffer-list)))))
(if buffers
;; We assume that the buffer with the same spec is unique.
(car buffers)
Expand Down Expand Up @@ -1564,7 +1564,7 @@ means the number of statuses retrieved after the last visiting of the buffer.")
(let* ((buffer (twittering-get-buffer-from-spec twittering-new-tweets-spec))
(current (or (cadr (assq buffer twittering-unread-status-info)) 0))
(result (+ current twittering-new-tweets-count)))
(unless (eq buffer (current-buffer))
(when (and buffer (not (eq buffer (current-buffer))))
(twittering-set-number-of-unread buffer result))))

(defun twittering-enable-unread-status-notifier ()
Expand Down Expand Up @@ -2404,7 +2404,7 @@ Available keywords:
;; statuses is nil. twitter server returns nil as
;; xmltree with HTTP status-code is "200" when we
;; retrieved all un-retrieved statuses.
(when new-statuses
(when (and new-statuses buffer)
(twittering-render-timeline buffer t new-statuses))
(twittering-add-timeline-history spec-string)))
(if twittering-notify-successful-http-get
Expand Down

0 comments on commit 15759bc

Please sign in to comment.