|
|
@ -534,10 +534,15 @@ public class FragmentDialogSend extends FragmentDialogBase {
|
|
|
|
args.putString("title", getString(R.string.title_send_at));
|
|
|
|
args.putString("title", getString(R.string.title_send_at));
|
|
|
|
args.putLong("id", id);
|
|
|
|
args.putLong("id", id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Bundle a = getArguments();
|
|
|
|
|
|
|
|
if (a != null && a.containsKey("sendAt"))
|
|
|
|
|
|
|
|
args.putLong("time", a.getLong("sendAt"));
|
|
|
|
|
|
|
|
else {
|
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
|
Calendar cal = Calendar.getInstance();
|
|
|
|
cal.setTimeInMillis(new Date().getTime());
|
|
|
|
cal.setTimeInMillis(new Date().getTime());
|
|
|
|
cal.set(Calendar.MINUTE, cal.get(Calendar.MINUTE) + 30);
|
|
|
|
cal.set(Calendar.MINUTE, cal.get(Calendar.MINUTE) + 30);
|
|
|
|
args.putLong("time", cal.getTimeInMillis());
|
|
|
|
args.putLong("time", cal.getTimeInMillis());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
FragmentDialogDuration fragment = new FragmentDialogDuration();
|
|
|
|
FragmentDialogDuration fragment = new FragmentDialogDuration();
|
|
|
|
fragment.setArguments(args);
|
|
|
|
fragment.setArguments(args);
|
|
|
@ -657,6 +662,9 @@ public class FragmentDialogSend extends FragmentDialogBase {
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (draft.ui_snoozed != null)
|
|
|
|
|
|
|
|
args.putLong("sendAt", draft.ui_snoozed);
|
|
|
|
|
|
|
|
|
|
|
|
if (TextUtils.isEmpty(draft.inreplyto)) {
|
|
|
|
if (TextUtils.isEmpty(draft.inreplyto)) {
|
|
|
|
args.putString("reason", "No in-reply-to");
|
|
|
|
args.putString("reason", "No in-reply-to");
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
@ -688,6 +696,9 @@ public class FragmentDialogSend extends FragmentDialogBase {
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
protected void onExecuted(Bundle args, Boolean data) {
|
|
|
|
protected void onExecuted(Bundle args, Boolean data) {
|
|
|
|
|
|
|
|
if (args.containsKey("sendAt"))
|
|
|
|
|
|
|
|
getArguments().putLong("sendAt", args.getLong("sendAt"));
|
|
|
|
|
|
|
|
|
|
|
|
if (!data) {
|
|
|
|
if (!data) {
|
|
|
|
String reason = args.getString("reason");
|
|
|
|
String reason = args.getString("reason");
|
|
|
|
if (BuildConfig.DEBUG)
|
|
|
|
if (BuildConfig.DEBUG)
|
|
|
@ -740,6 +751,8 @@ public class FragmentDialogSend extends FragmentDialogBase {
|
|
|
|
long id = data.getLong("id");
|
|
|
|
long id = data.getLong("id");
|
|
|
|
long time = data.getLong("time");
|
|
|
|
long time = data.getLong("time");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
getArguments().putLong("sendAt", time);
|
|
|
|
|
|
|
|
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
Bundle args = new Bundle();
|
|
|
|
args.putLong("id", id);
|
|
|
|
args.putLong("id", id);
|
|
|
|
args.putLong("time", time);
|
|
|
|
args.putLong("time", time);
|
|
|
|