Commits

Jens Diemer committed 30f8ed3

Use also "create" date in "show new", too.
---

Comments (0)

Files changed (1)

djangobb_forum/views.py

             last_read = PostTracking.objects.get(user=request.user).last_read
         except PostTracking.DoesNotExist:
             last_read = None
+
         if last_read:
-            topics = topics.filter(last_post__updated__gte=last_read).all()
+            topics = topics.filter(Q(last_post__created__gte=last_read) | Q(last_post__updated__gte=last_read))
         else:
             #searching more than forum_settings.SEARCH_PAGE_SIZE in this way - not good idea :]
             topics = [topic for topic in topics[:forum_settings.SEARCH_PAGE_SIZE] if forum_extras.has_unreads(topic, request.user)]
-
     elif action == 'show_unanswered':
         topics = topics.filter(post_count=1)
     elif action == 'show_subscriptions':