Small improvements

pull/172/head
M66B 5 years ago
parent 07bb5601cc
commit bee37b2b17

@ -792,6 +792,7 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
Intent update = new Intent(Intent.ACTION_VIEW, Uri.parse(info.html_url));
if (update.resolveActivity(getPackageManager()) != null) {
update.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent piUpdate = PendingIntent.getActivity(
ActivityView.this, REQUEST_UPDATE, update, PendingIntent.FLAG_UPDATE_CURRENT);
builder.setContentIntent(piUpdate);
@ -860,11 +861,11 @@ public class ActivityView extends ActivityBilling implements FragmentManager.OnB
Helper.viewFAQ(this, 2);
}
} else if ("alert".equals(action)) {
} else if ("alert".equals(action) || "error".equals(action)) {
if (getLifecycle().getCurrentState().isAtLeast(Lifecycle.State.STARTED))
getSupportFragmentManager().popBackStack("unified", 0);
Helper.viewFAQ(this, 23);
Helper.viewFAQ(this, "alert".equals(action) ? 23 : 22);
} else if ("outbox".equals(action))
onMenuOutbox();

@ -2795,6 +2795,7 @@ class Core {
// Build pending intents
Intent unified = new Intent(context, ActivityView.class)
.setAction("unified" + (notify_remove ? ":" + group : ""));
unified.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent piUnified = PendingIntent.getActivity(context, ActivityView.REQUEST_UNIFIED, unified, PendingIntent.FLAG_UPDATE_CURRENT);
Intent clear = new Intent(context, ServiceUI.class).setAction("clear:" + group);
@ -3211,6 +3212,7 @@ class Core {
static NotificationCompat.Builder getNotificationError(Context context, String channel, String title, Throwable ex) {
// Build pending intent
Intent intent = new Intent(context, ActivityView.class);
intent.setAction("error");
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent pi = PendingIntent.getActivity(
context, ActivityView.REQUEST_ERROR, intent, PendingIntent.FLAG_UPDATE_CURRENT);

@ -71,7 +71,7 @@ public class FragmentOptionsMisc extends FragmentBase implements SharedPreferenc
};
private final static String[] RESET_QUESTIONS = new String[]{
"welcome", "crash_reports_asked", "review_asked", "review_later",
"welcome", "crash_reports_asked", "review_asked", "review_later", "why",
"html_always_images", "print_html_confirmed",
"identities_asked", "cc_bcc", "inline_image_hint", "compose_reference", "send_dialog",
"setup_advanced"

@ -673,6 +673,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
// Build pending intent
Intent why = new Intent(this, ActivityView.class);
why.setAction("why");
why.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent piWhy = PendingIntent.getActivity(this, ActivityView.REQUEST_WHY, why, PendingIntent.FLAG_UPDATE_CURRENT);
// Build notification
@ -703,6 +704,7 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
// Build pending intent
Intent alert = new Intent(this, ActivityView.class);
alert.setAction("alert");
alert.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
PendingIntent piAlert = PendingIntent.getActivity(this, ActivityView.REQUEST_ALERT, alert, PendingIntent.FLAG_UPDATE_CURRENT);
// Build notification

Loading…
Cancel
Save