Small improvements

pull/153/head
M66B 6 years ago
parent 2e3142c1de
commit de57f2ede1

@ -153,7 +153,10 @@ abstract class ActivityBilling extends ActivityBase implements PurchasesUpdatedL
String expected = getResponse(); String expected = getResponse();
if (expected.equals(response)) { if (expected.equals(response)) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
prefs.edit().putBoolean("pro", true).apply(); prefs.edit()
.putBoolean("pro", true)
.putBoolean("play_store", false)
.apply();
Log.i("Response valid"); Log.i("Response valid");
Snackbar snackbar = Snackbar.make(getVisibleView(), R.string.title_pro_valid, Snackbar.LENGTH_LONG); Snackbar snackbar = Snackbar.make(getVisibleView(), R.string.title_pro_valid, Snackbar.LENGTH_LONG);
snackbar.setAction(R.string.title_check, new View.OnClickListener() { snackbar.setAction(R.string.title_check, new View.OnClickListener() {
@ -236,7 +239,8 @@ abstract class ActivityBilling extends ActivityBase implements PurchasesUpdatedL
if (purchases != null) { if (purchases != null) {
SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
SharedPreferences.Editor editor = prefs.edit(); SharedPreferences.Editor editor = prefs.edit();
editor.remove("pro"); if (prefs.getBoolean("play_store", true))
editor.remove("pro");
for (Purchase purchase : purchases) for (Purchase purchase : purchases)
try { try {

@ -857,7 +857,7 @@ public class FragmentMessages extends FragmentBase {
} }
}; };
SwipeListener swipeListener = new SwipeListener(getContext(), new SwipeListener.ISwipeListener() { private SwipeListener swipeListener = new SwipeListener(getContext(), new SwipeListener.ISwipeListener() {
@Override @Override
public boolean onSwipeRight() { public boolean onSwipeRight() {
if (previous != null) if (previous != null)
@ -2112,8 +2112,9 @@ public class FragmentMessages extends FragmentBase {
int count = 0; int count = 0;
for (int i = 0; i < messages.size(); i++) { for (int i = 0; i < messages.size(); i++) {
TupleMessageEx message = messages.get(i); TupleMessageEx message = messages.get(i);
if (message != null && if (message == null)
!EntityFolder.ARCHIVE.equals(message.folderType) && continue;
if (!EntityFolder.ARCHIVE.equals(message.folderType) &&
!EntityFolder.SENT.equals(message.folderType) && !EntityFolder.SENT.equals(message.folderType) &&
!EntityFolder.TRASH.equals(message.folderType) && !EntityFolder.TRASH.equals(message.folderType) &&
!EntityFolder.JUNK.equals(message.folderType)) !EntityFolder.JUNK.equals(message.folderType))

Loading…
Cancel
Save