* sb-mixi.el (shimbun-mixi-get-headers): Get headers of comments
authorbg66 <bg66>
Thu, 18 Jan 2007 07:54:58 +0000 (07:54 +0000)
committerbg66 <bg66>
Thu, 18 Jan 2007 07:54:58 +0000 (07:54 +0000)
before parent's.

ChangeLog
sb-mixi.el

index 7d75df6..fad19f2 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2007-01-18  OHASHI Akira  <bg66@koka-in.org>
 
+       * sb-mixi.el (shimbun-mixi-get-headers): Get headers of comments
+       before parent's.
+
+2007-01-18  OHASHI Akira  <bg66@koka-in.org>
+
        * sb-mixi.el (shimbun-mixi-get-headers): Stop getting comment's
        headers when it was already shown.
 
index 0c5f318..e14d07e 100644 (file)
@@ -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)))