Browse Source

Threads pagination unbobbined. #179

Rafał Pitoń 12 years ago
parent
commit
13ac7a17ca
1 changed files with 5 additions and 3 deletions
  1. 5 3
      misago/apps/threadtype/thread/views.py

+ 5 - 3
misago/apps/threadtype/thread/views.py

@@ -50,11 +50,13 @@ class ThreadBaseView(ViewBase):
             return redirect(reverse(self.type_prefix, kwargs={'thread': self.thread.pk, 'slug': self.thread.slug}))
 
         checkpoints_boundary = None
-        if settings.posts_per_page < self.count:
+
+        if self.pagination['total'] > 1:
             self.posts = self.posts[self.pagination['start']:self.pagination['stop'] + 1]
             posts_len = len(self.posts)
-            checkpoints_boundary = self.posts[posts_len - 1].date
-            self.posts = self.posts[0:(posts_len - 2)]
+            if self.pagination['page'] < self.pagination['total']:
+                checkpoints_boundary = self.posts[posts_len - 1].date
+                self.posts = self.posts[0:(posts_len - 1)]
 
         self.read_date = self.tracker.read_date(self.thread)