|
|
|
@ -299,9 +299,8 @@ public class FragmentMessages extends FragmentBase {
|
|
|
|
|
tvSupport.setOnClickListener(new View.OnClickListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onClick(View v) {
|
|
|
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext());
|
|
|
|
|
lbm.sendBroadcast(new Intent(ActivityView.ACTION_SHOW_PRO));
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -1544,7 +1543,12 @@ public class FragmentMessages extends FragmentBase {
|
|
|
|
|
new DialogDuration.IDialogDuration() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onDurationSelected(long duration, long time) {
|
|
|
|
|
if (Helper.isPro(getContext())) {
|
|
|
|
|
if (!Helper.isPro(getContext())) {
|
|
|
|
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext());
|
|
|
|
|
lbm.sendBroadcast(new Intent(ActivityView.ACTION_SHOW_PRO));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
|
args.putLongArray("ids", getSelection());
|
|
|
|
|
args.putLong("wakeup", duration == 0 ? -1 : time);
|
|
|
|
@ -1589,11 +1593,6 @@ public class FragmentMessages extends FragmentBase {
|
|
|
|
|
Helper.unexpectedError(getContext(), getViewLifecycleOwner(), ex);
|
|
|
|
|
}
|
|
|
|
|
}.execute(FragmentMessages.this, args, "messages:snooze");
|
|
|
|
|
} else {
|
|
|
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1649,9 +1648,8 @@ public class FragmentMessages extends FragmentBase {
|
|
|
|
|
|
|
|
|
|
private void onActionFlagColorSelection() {
|
|
|
|
|
if (!Helper.isPro(getContext())) {
|
|
|
|
|
FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction();
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(getContext());
|
|
|
|
|
lbm.sendBroadcast(new Intent(ActivityView.ACTION_SHOW_PRO));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -3258,7 +3256,12 @@ public class FragmentMessages extends FragmentBase {
|
|
|
|
|
static void search(
|
|
|
|
|
final Context context, final LifecycleOwner owner, final FragmentManager manager,
|
|
|
|
|
long folder, boolean server, String query) {
|
|
|
|
|
if (Helper.isPro(context)) {
|
|
|
|
|
if (!Helper.isPro(context)) {
|
|
|
|
|
LocalBroadcastManager lbm = LocalBroadcastManager.getInstance(context);
|
|
|
|
|
lbm.sendBroadcast(new Intent(ActivityView.ACTION_SHOW_PRO));
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (owner.getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
|
|
|
|
manager.popBackStack("search", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
|
|
|
|
|
|
|
|
@ -3273,14 +3276,6 @@ public class FragmentMessages extends FragmentBase {
|
|
|
|
|
FragmentTransaction fragmentTransaction = manager.beginTransaction();
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, fragment).addToBackStack("search");
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
} else {
|
|
|
|
|
if (owner.getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.RESUMED))
|
|
|
|
|
manager.popBackStack("pro", FragmentManager.POP_BACK_STACK_INCLUSIVE);
|
|
|
|
|
|
|
|
|
|
FragmentTransaction fragmentTransaction = manager.beginTransaction();
|
|
|
|
|
fragmentTransaction.replace(R.id.content_frame, new FragmentPro()).addToBackStack("pro");
|
|
|
|
|
fragmentTransaction.commit();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
private class MoreResult {
|
|
|
|
|