FIX: Sort user bookmarks by reminder date (#13145)

This commit is contained in:
Penar Musaraj
2021-05-25 15:23:46 -04:00
committed by GitHub
parent 72950e051c
commit 6e9ee3db03
2 changed files with 38 additions and 10 deletions
+1 -1
View File
@@ -28,7 +28,7 @@ class BookmarkQuery
def list_all
results = user_bookmarks.order(
'(CASE WHEN bookmarks.pinned THEN 0 ELSE 1 END), bookmarks.updated_at DESC'
'(CASE WHEN bookmarks.pinned THEN 0 ELSE 1 END), bookmarks.reminder_at ASC, bookmarks.updated_at DESC'
)
topics = Topic.listable_topics.secured(@guardian)