Fix notification bug

This commit is contained in:
Niels Andriesse 2020-02-06 10:02:13 +11:00
parent f88a4d8a97
commit abae6ddb12
2 changed files with 8 additions and 6 deletions

View File

@ -8,8 +8,7 @@ import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.NotificationCompat;
import org.thoughtcrime.securesms.ConversationListActivity;
import network.loki.messenger.R;
import org.thoughtcrime.securesms.loki.redesign.activities.HomeActivity;
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
import org.thoughtcrime.securesms.recipients.Recipient;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
@ -18,6 +17,8 @@ import org.thoughtcrime.securesms.util.Util;
import java.util.LinkedList;
import java.util.List;
import network.loki.messenger.R;
public class MultipleRecipientNotificationBuilder extends AbstractNotificationBuilder {
private final List<CharSequence> messageBodies = new LinkedList<>();
@ -28,7 +29,7 @@ public class MultipleRecipientNotificationBuilder extends AbstractNotificationBu
setColor(context.getResources().getColor(R.color.textsecure_primary));
setSmallIcon(R.drawable.ic_notification);
setContentTitle(context.getString(R.string.app_name));
setContentIntent(PendingIntent.getActivity(context, 0, new Intent(context, ConversationListActivity.class), 0));
setContentIntent(PendingIntent.getActivity(context, 0, new Intent(context, HomeActivity.class), 0));
setCategory(NotificationCompat.CATEGORY_MESSAGE);
setGroupSummary(true);

View File

@ -6,18 +6,19 @@ import android.content.Context;
import android.content.Intent;
import android.support.v4.app.NotificationCompat;
import org.thoughtcrime.securesms.ConversationListActivity;
import network.loki.messenger.R;
import org.thoughtcrime.securesms.database.RecipientDatabase;
import org.thoughtcrime.securesms.loki.redesign.activities.HomeActivity;
import org.thoughtcrime.securesms.preferences.widgets.NotificationPrivacyPreference;
import org.thoughtcrime.securesms.util.TextSecurePreferences;
import network.loki.messenger.R;
public class PendingMessageNotificationBuilder extends AbstractNotificationBuilder {
public PendingMessageNotificationBuilder(Context context, NotificationPrivacyPreference privacy) {
super(context, privacy);
Intent intent = new Intent(context, ConversationListActivity.class);
Intent intent = new Intent(context, HomeActivity.class);
setSmallIcon(R.drawable.ic_notification);
setColor(context.getResources().getColor(R.color.textsecure_primary));