Skip to content

Commit

Permalink
Fix a bug on updating timeline history.
Browse files Browse the repository at this point in the history
* twittering-mode.el: Fix a bug on updating timeline history.
(twittering-http-get-default-sentinel): call
`twittering-add-timeline-history' with correct timeline spec
string.
(twittering-add-timeline-history): receive timeline spec string
instead of timeline spec.
  • Loading branch information
cvmat committed Apr 6, 2010
1 parent d4bad2d commit 9ecf60c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
10 changes: 10 additions & 0 deletions ChangeLog
@@ -1,3 +1,13 @@
2010-04-07 Tadashi MATSUO <tad@mymail.twin.jp>

* twittering-mode.el: Fix a bug on updating timeline history.
(twittering-http-get-default-sentinel): call
`twittering-add-timeline-history' with correct timeline spec
string.
(twittering-add-timeline-history): receive timeline spec string
instead of timeline spec.


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

* twittering-mode.el (twittering-new-tweets-spec): new variable
Expand Down
21 changes: 8 additions & 13 deletions twittering-mode.el
Expand Up @@ -1038,18 +1038,13 @@ direct_messages."
`(search ,word))
(t nil)))

(defun twittering-add-timeline-history (&optional timeline-spec)
(let ((spec-string
(if timeline-spec
(twittering-timeline-spec-to-string timeline-spec t)
(twittering-current-timeline-spec-string))))
(when spec-string
(when (or (null twittering-timeline-history)
(not (string= spec-string (car twittering-timeline-history))))
(if (functionp 'add-to-history)
(add-to-history 'twittering-timeline-history spec-string)
(setq twittering-timeline-history
(cons spec-string twittering-timeline-history)))))))
(defun twittering-add-timeline-history (spec-string)
(when (or (null twittering-timeline-history)
(not (string= spec-string (car twittering-timeline-history))))
(if (functionp 'add-to-history)
(add-to-history 'twittering-timeline-history spec-string)
(setq twittering-timeline-history
(cons spec-string twittering-timeline-history)))))

;;;
;;; Timeline info
Expand Down Expand Up @@ -2362,7 +2357,7 @@ Available keywords:
;; retrieved all un-retrieved statuses.
(when new-statuses
(twittering-render-timeline buffer t new-statuses))
(twittering-add-timeline-history)))
(twittering-add-timeline-history spec-string)))
(if twittering-notify-successful-http-get
(if suc-msg suc-msg (format "Success: Get %s." spec-string))
nil)))
Expand Down

0 comments on commit 9ecf60c

Please sign in to comment.