|
|
|
@ -575,7 +575,6 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
fabMove.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
if (Helper.isPro(getContext())) {
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
|
args.putLong("folder", folder);
|
|
|
|
|
|
|
|
|
@ -690,18 +689,12 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
Helper.unexpectedError(getContext(), ex);
|
|
|
|
|
}
|
|
|
|
|
}.load(FragmentMessages.this, args);
|
|
|
|
|
} else {
|
|
|
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
fabDelete.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
if (Helper.isPro(getContext()))
|
|
|
|
|
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
|
|
|
|
|
.setMessage(R.string.title_ask_delete_selected)
|
|
|
|
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
|
|
|
@ -758,12 +751,6 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
})
|
|
|
|
|
.setNegativeButton(android.R.string.cancel, null)
|
|
|
|
|
.show();
|
|
|
|
|
else {
|
|
|
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -1039,15 +1026,9 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
|
|
|
|
|
|
case R.id.menu_sort_on_unread:
|
|
|
|
|
case R.id.menu_sort_on_starred:
|
|
|
|
|
if (Helper.isPro(getContext())) {
|
|
|
|
|
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;
|
|
|
|
|
|
|
|
|
|
case R.id.menu_folders:
|
|
|
|
|