Skip to content

Commit

Permalink
Add datetime function to Saved feed local database sorting
Browse files Browse the repository at this point in the history
	These entities were being sorted by date_tagged as a string, 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 ee1744c commit 6585b19
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ private static String getSortColumnForTag(ReaderTag tag) {
} else if (tag.tagType == ReaderTagType.SEARCH) {
return "score";
} else if (tag.isTagTopic() || tag.isBookmarked()) {
return "date_tagged";
return "datetime(date_tagged)";
} else {
return "datetime(date_published)";
}
Expand Down

0 comments on commit 6585b19

Please sign in to comment.