فهرست منبع

Order history by `changed_at, published_at`

When a bunch of entries are marked as read at once, they should have the
same `changed_at`; fall back to sorting them chronologically by
publication date.
Naïm Favier 3 سال پیش
والد
کامیت
7d1609bd93
1فایلهای تغییر یافته به همراه1 افزوده شده و 2 حذف شده
  1. 1 2
      ui/history_entries.go

+ 1 - 2
ui/history_entries.go

@@ -25,8 +25,7 @@ func (h *handler) showHistoryPage(w http.ResponseWriter, r *http.Request) {
 	offset := request.QueryIntParam(r, "offset", 0)
 	builder := h.store.NewEntryQueryBuilder(user.ID)
 	builder.WithStatus(model.EntryStatusRead)
-	builder.WithOrder("changed_at")
-	builder.WithDirection("desc")
+	builder.WithOrder("changed_at DESC, published_at DESC")
 	builder.WithOffset(offset)
 	builder.WithLimit(user.EntriesPerPage)