mirror of https://github.com/M66B/FairEmail.git
Simplification
This commit is contained in:
parent
0b3db5db31
commit
f5bf3515c5
|
@ -3689,11 +3689,6 @@ public class FragmentCompose extends FragmentBase {
|
|||
if (context == null)
|
||||
return;
|
||||
|
||||
if (!ActivityBilling.isPro(context)) {
|
||||
context.startActivity(new Intent(context, ActivityBilling.class));
|
||||
return;
|
||||
}
|
||||
|
||||
Bundle data = intent.getBundleExtra("args");
|
||||
long id = data.getLong("id");
|
||||
long duration = data.getLong("duration");
|
||||
|
|
|
@ -21,6 +21,7 @@ package eu.faircode.email;
|
|||
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.os.Build;
|
||||
import android.os.Bundle;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -39,6 +40,7 @@ import java.text.SimpleDateFormat;
|
|||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
|
||||
import static android.app.Activity.RESULT_CANCELED;
|
||||
import static android.app.Activity.RESULT_OK;
|
||||
|
||||
public class FragmentDialogDuration extends FragmentDialogEx {
|
||||
|
@ -163,4 +165,16 @@ public class FragmentDialogDuration extends FragmentDialogEx {
|
|||
|
||||
return dialog;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void sendResult(int result) {
|
||||
if (result == RESULT_OK) {
|
||||
if (!ActivityBilling.isPro(getContext())) {
|
||||
getActivity().startActivity(new Intent(getContext(), ActivityBilling.class));
|
||||
result = RESULT_CANCELED;
|
||||
}
|
||||
}
|
||||
|
||||
super.sendResult(result);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4247,11 +4247,6 @@ public class FragmentMessages extends FragmentBase implements SharedPreferences.
|
|||
}
|
||||
|
||||
private void onSnooze(Bundle args) {
|
||||
if (!ActivityBilling.isPro(getContext())) {
|
||||
getContext().startActivity(new Intent(getContext(), ActivityBilling.class));
|
||||
return;
|
||||
}
|
||||
|
||||
long duration = args.getLong("duration");
|
||||
long time = args.getLong("time");
|
||||
args.putLong("wakeup", duration == 0 ? -1 : time);
|
||||
|
|
Loading…
Reference in New Issue