From 1b6c1fb55da90b146674304d55e01f591c2a6bbf Mon Sep 17 00:00:00 2001 From: bg66 Date: Thu, 18 Jan 2007 07:54:58 +0000 Subject: [PATCH] * sb-mixi.el (shimbun-mixi-get-headers): Get headers of comments before parent's. --- ChangeLog | 5 +++++ sb-mixi.el | 46 +++++++++++++++++++++++----------------------- 2 files changed, 28 insertions(+), 23 deletions(-) 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))) -- 1.7.10.4