Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 59c1946c authored by Coldice Ray Esedra's avatar Coldice Ray Esedra
Browse files

fixed issue#645 that notification will show again when dismissed if the app is...

fixed issue#645 that notification will show again when dismissed if the app is not the default message app.
parent c54c1cc2
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ import com.moez.QKSMS.model.SlideshowModel;
import com.moez.QKSMS.receiver.RemoteMessagingReceiver;
import com.moez.QKSMS.ui.MainActivity;
import com.moez.QKSMS.ui.ThemeManager;
import com.moez.QKSMS.ui.dialog.DefaultSmsHelper;
import com.moez.QKSMS.ui.messagelist.MessageItem;
import com.moez.QKSMS.ui.messagelist.MessageListActivity;
import com.moez.QKSMS.ui.popup.QKComposeActivity;
@@ -244,7 +245,8 @@ public class NotificationManager {
                dismissOld(context, conversations);

                // If there are no messages, don't try to create a notification
                if (conversations.size() == 0) {
                // If this app is not default message app, don't try to create a notification either
                if (conversations.size() == 0||!(new DefaultSmsHelper(context, 0).isDefault())) {
                    return;
                }

+4 −0
Original line number Diff line number Diff line
@@ -84,4 +84,8 @@ public class DefaultSmsHelper implements ActionClickListener {

        return snackbarType;
    }

    public boolean isDefault() {
        return mIsDefault;
    }
}
+1 −1
Original line number Diff line number Diff line
@@ -3,6 +3,6 @@ buildscript {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.3'
        classpath 'com.android.tools.build:gradle:2.2.3'
    }
}