diff options
author | Brendan Long <self@brendanlong.com> | 2019-05-13 20:56:50 +0300 |
---|---|---|
committer | Brendan Long <self@brendanlong.com> | 2019-05-24 21:43:49 +0300 |
commit | 4475c8e77aa0e273b816413331fe6aff08dae630 (patch) | |
tree | e04e570a3995e489a7e897ca12e64d5d486a67af /src | |
parent | 1f8431bce62b292578bf5adac65e4788ef3ea87c (diff) |
Use "oldest article first" sorting switch everywhere
This was previously restricted to just the Unread articles tab, but
the hover text for this was non-obvious and it seems strange to have
this setting only apply on one tab.
Fixes #901
Diffstat (limited to 'src')
-rw-r--r-- | src/DataBaseReadOnly.vala | 8 | ||||
-rw-r--r-- | src/Widgets/SettingsDialog.vala | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/DataBaseReadOnly.vala b/src/DataBaseReadOnly.vala index 7e8b494a..58106e81 100644 --- a/src/DataBaseReadOnly.vala +++ b/src/DataBaseReadOnly.vala @@ -507,7 +507,7 @@ public class FeedReader.DataBaseReadOnly : GLib.Object { query.select_field(order_by); - if(Settings.general().get_boolean("articlelist-oldest-first") && state == ArticleListState.UNREAD) + if(Settings.general().get_boolean("articlelist-oldest-first")) { query2.where(@"$order_by < (%s)".printf(query.to_string())); } @@ -570,7 +570,7 @@ public class FeedReader.DataBaseReadOnly : GLib.Object { } bool desc = true; - if(Settings.general().get_boolean("articlelist-oldest-first") && state == ArticleListState.UNREAD) + if(Settings.general().get_boolean("articlelist-oldest-first")) { desc = false; } @@ -1016,7 +1016,7 @@ public class FeedReader.DataBaseReadOnly : GLib.Object { } bool desc = true; - if(Settings.general().get_boolean("articlelist-oldest-first") && state == ArticleListState.UNREAD) + if(Settings.general().get_boolean("articlelist-oldest-first")) { desc = false; } @@ -1032,7 +1032,7 @@ public class FeedReader.DataBaseReadOnly : GLib.Object { var query = articleQuery(id, selectedType, state, searchTerm); string desc = "DESC"; - if(Settings.general().get_boolean("articlelist-oldest-first") && state == ArticleListState.UNREAD) + if(Settings.general().get_boolean("articlelist-oldest-first")) { desc = "ASC"; } diff --git a/src/Widgets/SettingsDialog.vala b/src/Widgets/SettingsDialog.vala index 726c8aff..b64d32df 100644 --- a/src/Widgets/SettingsDialog.vala +++ b/src/Widgets/SettingsDialog.vala @@ -101,7 +101,7 @@ public class FeedReader.SettingsDialog : Gtk.Dialog { ColumnView.get_default().newArticleList(); }); - var newest_first = new SettingSwitch(_("Oldest first"), Settings.general(), "articlelist-oldest-first", _("Only affects \"Unread\" column")); + var newest_first = new SettingSwitch(_("Oldest first"), Settings.general(), "articlelist-oldest-first"); newest_first.changed.connect(() => { ColumnView.get_default().newArticleList(); }); |