From: bg66 Date: Thu, 18 Jan 2007 07:54:58 +0000 (+0000) Subject: * sb-mixi.el (shimbun-mixi-get-headers): Get headers of comments X-Git-Tag: mixi-el-1_0_0~95 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=1b6c1fb55da90b146674304d55e01f591c2a6bbf;p=elisp%2Fmixi.git * sb-mixi.el (shimbun-mixi-get-headers): Get headers of comments before parent's. --- diff --git a/ChangeLog b/ChangeLog index 7d75df6..fad19f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,10 @@ 2007-01-18 OHASHI Akira + * sb-mixi.el (shimbun-mixi-get-headers): Get headers of comments + before parent's. + +2007-01-18 OHASHI Akira + * sb-mixi.el (shimbun-mixi-get-headers): Stop getting comment's headers when it was already shown. diff --git a/sb-mixi.el b/sb-mixi.el index 0c5f318..e14d07e 100644 --- a/sb-mixi.el +++ b/sb-mixi.el @@ -255,25 +255,7 @@ of mixi object." (catch 'stop (mapc (lambda (object) (when (mixi-object-p object) - (let ((class (mixi-object-class object)) - (id (shimbun-mixi-make-message-id object))) - (when (and (eq class 'mixi-comment) - (shimbun-search-id shimbun id)) - (throw 'stop nil)) - (push - (shimbun-create-header - 0 - (shimbun-mixi-make-subject shimbun object) - (shimbun-mixi-make-from object) - (shimbun-mixi-make-date object) - id - (if (eq class 'mixi-comment) - (shimbun-mixi-make-message-id - (mixi-comment-parent object)) - "") - 0 0 - (shimbun-mixi-make-xref object)) - headers) + (let ((class (mixi-object-class object))) (when (or (eq class 'mixi-diary) (mixi-bbs-p object)) (let ((comments (mixi-get-comments object range))) @@ -281,10 +263,28 @@ of mixi object." (push header headers)) (shimbun-mixi-get-headers shimbun comments)))) - (when (eq class 'mixi-comment) - (puthash id (mixi-comment-content object) - (shimbun-mixi-comment-cache-internal - shimbun)))))) + (let ((id (shimbun-mixi-make-message-id object))) + (when (and (eq class 'mixi-comment) + (shimbun-search-id shimbun id)) + (throw 'stop nil)) + (push + (shimbun-create-header + 0 + (shimbun-mixi-make-subject shimbun object) + (shimbun-mixi-make-from object) + (shimbun-mixi-make-date object) + id + (if (eq class 'mixi-comment) + (shimbun-mixi-make-message-id + (mixi-comment-parent object)) + "") + 0 0 + (shimbun-mixi-make-xref object)) + headers) + (when (eq class 'mixi-comment) + (puthash id (mixi-comment-content object) + (shimbun-mixi-comment-cache-internal + shimbun))))))) objects)) headers)))