diff options
author | Andrew Dolgov <[email protected]> | 2019-06-17 14:47:29 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-06-17 14:47:29 +0300 |
commit | 1de619011135a7cdc6249df61a793d05f653fd49 (patch) | |
tree | 186a8fd5dd53913c89ad024eadd3cb484ba4febe /org.fox.ttrss/src/main/java | |
parent | cdb6725a3aa2b633d3e8474b39fffec96734cd5b (diff) | |
parent | a6442e08ea21fce440319252bf995cfa37c94084 (diff) |
Merge branch 'master' of git.fakecake.org:tt-rss-android
Diffstat (limited to 'org.fox.ttrss/src/main/java')
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java | 1 | ||||
-rwxr-xr-x | org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java index 342d4520..cd346d14 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/CommonActivity.java @@ -76,6 +76,7 @@ public class CommonActivity extends AppCompatActivity implements SharedPreferenc public static final int EXCERPT_MAX_LENGTH = 256; public static final int EXCERPT_MAX_QUERY_LENGTH = 2048; + public static final int LABEL_BASE_INDEX = -1024; public static final int PENDING_INTENT_CHROME_SHARE = 1; diff --git a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java index 4d88d320..58e76a34 100755 --- a/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java +++ b/org.fox.ttrss/src/main/java/org/fox/ttrss/FeedsFragment.java @@ -241,16 +241,19 @@ public class FeedsFragment extends BaseFeedlistFragment implements OnItemClickLi return a.order_id - b.order_id; else return a.title.toUpperCase().compareTo(b.title.toUpperCase()); - else if (a.is_cat && !b.is_cat) + else if (a.is_cat) return -1; - else if (!a.is_cat && b.is_cat) + else if (b.is_cat) return 1; else if (a.order_id != 0 && b.order_id != 0) return a.order_id - b.order_id; else return a.title.toUpperCase().compareTo(b.title.toUpperCase()); else - return a.id - b.id; + if (a.id < CommonActivity.LABEL_BASE_INDEX && b.id < CommonActivity.LABEL_BASE_INDEX) + return a.title.toUpperCase().compareTo(b.title.toUpperCase()); + else + return a.id - b.id; } } |