|
|
@ -575,7 +575,6 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
fabMove.setOnClickListener(new View.OnClickListener() {
|
|
|
|
fabMove.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onClick(View v) {
|
|
|
|
if (Helper.isPro(getContext())) {
|
|
|
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
args.putLong("folder", folder);
|
|
|
|
args.putLong("folder", folder);
|
|
|
|
|
|
|
|
|
|
|
@ -690,18 +689,12 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
Helper.unexpectedError(getContext(), ex);
|
|
|
|
Helper.unexpectedError(getContext(), ex);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}.load(FragmentMessages.this, args);
|
|
|
|
}.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() {
|
|
|
|
fabDelete.setOnClickListener(new View.OnClickListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onClick(View v) {
|
|
|
|
public void onClick(View v) {
|
|
|
|
if (Helper.isPro(getContext()))
|
|
|
|
|
|
|
|
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
|
|
|
|
new DialogBuilderLifecycle(getContext(), getViewLifecycleOwner())
|
|
|
|
.setMessage(R.string.title_ask_delete_selected)
|
|
|
|
.setMessage(R.string.title_ask_delete_selected)
|
|
|
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
|
|
|
.setPositiveButton(android.R.string.ok, new DialogInterface.OnClickListener() {
|
|
|
@ -758,12 +751,6 @@ public class FragmentMessages extends FragmentEx {
|
|
|
|
})
|
|
|
|
})
|
|
|
|
.setNegativeButton(android.R.string.cancel, null)
|
|
|
|
.setNegativeButton(android.R.string.cancel, null)
|
|
|
|
.show();
|
|
|
|
.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_unread:
|
|
|
|
case R.id.menu_sort_on_starred:
|
|
|
|
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();
|
|
|
|
prefs.edit().putString("sort", item.getItemId() == R.id.menu_sort_on_unread ? "unread" : "starred").apply();
|
|
|
|
item.setChecked(true);
|
|
|
|
item.setChecked(true);
|
|
|
|
loadMessages();
|
|
|
|
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:
|
|
|
|