aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart')
-rw-r--r--src/main/java/de/pixart/messenger/services/NotificationService.java21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/main/java/de/pixart/messenger/services/NotificationService.java b/src/main/java/de/pixart/messenger/services/NotificationService.java
index edc93d7b7..e351bbb89 100644
--- a/src/main/java/de/pixart/messenger/services/NotificationService.java
+++ b/src/main/java/de/pixart/messenger/services/NotificationService.java
@@ -41,6 +41,7 @@ import de.pixart.messenger.entities.Contact;
import de.pixart.messenger.entities.Conversation;
import de.pixart.messenger.entities.Message;
import de.pixart.messenger.ui.ConversationActivity;
+import de.pixart.messenger.ui.EditAccountActivity;
import de.pixart.messenger.ui.ManageAccountActivity;
import de.pixart.messenger.ui.TimePreference;
import de.pixart.messenger.utils.GeoHelper;
@@ -747,10 +748,22 @@ public class NotificationService {
mBuilder.setDeleteIntent(createDismissErrorIntent());
mBuilder.setVisibility(NotificationCompat.VISIBILITY_PUBLIC);
mBuilder.setSmallIcon(R.drawable.ic_warning_white_24dp);
- mBuilder.setContentIntent(PendingIntent.getActivity(mXmppConnectionService,
- 145,
- new Intent(mXmppConnectionService, ManageAccountActivity.class),
- PendingIntent.FLAG_UPDATE_CURRENT));
+ if (errors.size() == 1) {
+ Intent intent = new Intent(mXmppConnectionService, EditAccountActivity.class);
+ Account mAccount = mXmppConnectionService.getAccounts().get(0);
+ intent.putExtra("jid", mAccount.getJid().toBareJid().toString());
+ intent.putExtra("init", false);
+ mBuilder.setContentIntent(PendingIntent.getActivity(mXmppConnectionService,
+ 145,
+ intent,
+ PendingIntent.FLAG_UPDATE_CURRENT));
+ } else {
+ mBuilder.setContentIntent(PendingIntent.getActivity(mXmppConnectionService,
+ 145,
+ new Intent(mXmppConnectionService, ManageAccountActivity.class),
+ PendingIntent.FLAG_UPDATE_CURRENT));
+ }
+
notificationManager.notify(ERROR_NOTIFICATION_ID, mBuilder.build());
}
}