Skip to content

Commit

Permalink
Add datetime function to subscriptions feed local database sorting
Browse files Browse the repository at this point in the history
These entities were being sorted by date_published, and it works as long as they are inserted with the same timezone. This solution is weak, because if the timezone ever changes among entities the sorting will stop working. Using datetime function solves this issue.
  • Loading branch information
RenanLukas committed Jan 15, 2024
1 parent 9049409 commit 7d9558a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,7 @@ private static String getSortColumnForTag(ReaderTag tag) {
if (tag.isPostsILike()) {
return "datetime(date_liked)";
} else if (tag.isFollowedSites()) {
return "date_published";
return "datetime(date_published)";
} else if (tag.tagType == ReaderTagType.SEARCH) {
return "score";
} else if (tag.isTagTopic() || tag.isBookmarked()) {
Expand Down

0 comments on commit 7d9558a

Please sign in to comment.