* mixi.el (mixi-diary-comment-list-page): Use `full=1' instead of
authorbg66 <bg66>
Fri, 1 Dec 2006 04:23:38 +0000 (04:23 +0000)
committerbg66 <bg66>
Fri, 1 Dec 2006 04:23:38 +0000 (04:23 +0000)
`page=%d'.
(mixi-get-comments): Get comments in latest order.

ChangeLog
mixi.el

index 2fe21ba..143d7ea 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2006-12-01  OHASHI Akira  <bg66@koka-in.org>
 
+       * mixi.el (mixi-diary-comment-list-page): Use `full=1' instead of
+       `page=%d'.
+       (mixi-get-comments): Get comments in latest order.
+
+2006-12-01  OHASHI Akira  <bg66@koka-in.org>
+
        * mixi.el (mixi-parse-buffer): Rename from `mixi-retrieve-1', and
        swap `buffer' argument and `url'.
        (mixi-url-retrieve): Follow the change above.
diff --git a/mixi.el b/mixi.el
index 5715b15..222266e 100644 (file)
--- a/mixi.el
+++ b/mixi.el
@@ -1733,7 +1733,7 @@ Increase this value when unexpected error frequently occurs."
   (aref (cdr comment) 3))
 
 (defun mixi-diary-comment-list-page (diary)
-  (concat "/view_diary.pl?page=%d"
+  (concat "/view_diary.pl?full=1"
          "&id=" (mixi-diary-id diary)
          "&owner_id=" (mixi-friend-id (mixi-diary-owner diary))))
 
@@ -1837,7 +1837,16 @@ Increase this value when unexpected error frequently occurs."
         (regexp (eval (intern (concat mixi-object-prefix name
                                       "-comment-list-regexp")))))
     (let ((items (mixi-get-matched-items
-                 (funcall list-page parent) regexp range)))
+                 (funcall list-page parent) regexp)))
+      (let (list)
+       (catch 'stop
+         (mapc (lambda (item)
+                 (when (and (numberp range)
+                            (>= (length list) range))
+                   (throw 'stop nil))
+                 (setq list (cons item list)))
+               (reverse items)))
+       (setq items (reverse list)))
       (mapcar (lambda (item)
                (mixi-make-comment parent (mixi-make-friend
                                           (nth 7 item) (nth 8 item))