mirror of
https://github.com/quik-sms/quik.git
synced 2026-11-19 20:38:53 +01:00
fixed issue#645 that notification will show again when dismissed if the app is not the default message app.
This commit is contained in:
@@ -36,6 +36,7 @@ import com.moez.QKSMS.model.SlideshowModel;
|
|||||||
import com.moez.QKSMS.receiver.RemoteMessagingReceiver;
|
import com.moez.QKSMS.receiver.RemoteMessagingReceiver;
|
||||||
import com.moez.QKSMS.ui.MainActivity;
|
import com.moez.QKSMS.ui.MainActivity;
|
||||||
import com.moez.QKSMS.ui.ThemeManager;
|
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.MessageItem;
|
||||||
import com.moez.QKSMS.ui.messagelist.MessageListActivity;
|
import com.moez.QKSMS.ui.messagelist.MessageListActivity;
|
||||||
import com.moez.QKSMS.ui.popup.QKComposeActivity;
|
import com.moez.QKSMS.ui.popup.QKComposeActivity;
|
||||||
@@ -244,7 +245,8 @@ public class NotificationManager {
|
|||||||
dismissOld(context, conversations);
|
dismissOld(context, conversations);
|
||||||
|
|
||||||
// If there are no messages, don't try to create a notification
|
// 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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -84,4 +84,8 @@ public class DefaultSmsHelper implements ActionClickListener {
|
|||||||
|
|
||||||
return snackbarType;
|
return snackbarType;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isDefault() {
|
||||||
|
return mIsDefault;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -3,6 +3,6 @@ buildscript {
|
|||||||
jcenter()
|
jcenter()
|
||||||
}
|
}
|
||||||
dependencies {
|
dependencies {
|
||||||
classpath 'com.android.tools.build:gradle:2.1.3'
|
classpath 'com.android.tools.build:gradle:2.2.3'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user