mirror of
https://github.com/M66B/FairEmail.git
synced 2026-04-02 23:26:12 +02:00
Added send/manage button
This commit is contained in:
@@ -93,7 +93,8 @@ public class ActivitySetup extends ActivityBase implements FragmentManager.OnBac
|
||||
static final int REQUEST_DELETE_ACCOUNT = 11;
|
||||
static final int REQUEST_IMPORT_PROVIDERS = 12;
|
||||
|
||||
static final int PI_MISC = 1;
|
||||
static final int PI_CONNECTION = 1;
|
||||
static final int PI_MISC = 2;
|
||||
|
||||
static final String ACTION_QUICK_GMAIL = BuildConfig.APPLICATION_ID + ".ACTION_QUICK_GMAIL";
|
||||
static final String ACTION_QUICK_OAUTH = BuildConfig.APPLICATION_ID + ".ACTION_QUICK_OAUTH";
|
||||
|
||||
@@ -245,6 +245,20 @@ public class ServiceSend extends ServiceBase implements SharedPreferences.OnShar
|
||||
if (lastProgress >= 0)
|
||||
builder.setProgress(100, lastProgress, false);
|
||||
|
||||
if (!lastSuitable) {
|
||||
Intent manage = new Intent(this, ActivitySetup.class)
|
||||
.setAction("connection")
|
||||
.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK)
|
||||
.putExtra("tab", "connection");
|
||||
PendingIntent piManage = PendingIntentCompat.getActivity(
|
||||
this, ActivitySetup.PI_CONNECTION, manage, PendingIntent.FLAG_UPDATE_CURRENT);
|
||||
NotificationCompat.Action.Builder actionManage = new NotificationCompat.Action.Builder(
|
||||
R.drawable.twotone_settings_24,
|
||||
getString(R.string.title_setup_manage),
|
||||
piManage);
|
||||
builder.addAction(actionManage.build());
|
||||
}
|
||||
|
||||
Notification notification = builder.build();
|
||||
notification.flags |= Notification.FLAG_NO_CLEAR;
|
||||
return notification;
|
||||
|
||||
Reference in New Issue
Block a user