Browse Source

Made sort pro feature

main
M66B 6 years ago
parent
commit
86afc0d1d5
2 changed files with 10 additions and 8 deletions
  1. +1
    -0
      README.md
  2. +9
    -8
      app/src/main/java/eu/faircode/email/FragmentMessages.java

+ 1
- 0
README.md View File

@ -34,6 +34,7 @@ Pro features
* Signatures * Signatures
* Account colors * Account colors
* Standard replies * Standard replies
* Sort on time, unread or starred
* Progressive search (first local, then server) * Progressive search (first local, then server)
* Preview sender/subject in new messages status bar notification * Preview sender/subject in new messages status bar notification


+ 9
- 8
app/src/main/java/eu/faircode/email/FragmentMessages.java View File

@ -564,15 +564,16 @@ public class FragmentMessages extends FragmentEx {
return true; return true;
case R.id.menu_sort_on_unread: case R.id.menu_sort_on_unread:
prefs.edit().putString("sort", "unread").apply();
item.setChecked(true);
loadMessages();
return true;
case R.id.menu_sort_on_starred: case R.id.menu_sort_on_starred:
prefs.edit().putString("sort", "starred").apply();
item.setChecked(true);
loadMessages();
if (prefs.getBoolean("pro", false)) {
prefs.edit().putString("sort", item.getItemId() == R.id.menu_sort_on_unread ? "unread" : "starred").apply();
item.setChecked(true);
loadMessages();
} else {
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
fragmentTransaction.commit();
}
return true; return true;
case R.id.menu_folders: case R.id.menu_folders:


Loading…
Cancel
Save