Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Support multi-message
Browse files Browse the repository at this point in the history
  • Loading branch information
RichardLuo0 committed Apr 18, 2019
1 parent cf19ade commit c2e18e2
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
Binary file modified app/release/app-release.apk
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void onNotificationPosted(StatusBarNotification sbn) {
case "com.tencent.qqlite":
case "com.tencent.tim":
case "com.tencent.mobileqq":
if (!(title.contains("QQ空间") || title.contains("条新消息)"))) {
if (!(title.contains("QQ空间"))) {
if (oneNotification.tickerText != null) {
String[] tickerText = oneNotification.tickerText.toString().replaceAll("\n", " ").split(":", 2);
if (tickerText[0].charAt(tickerText[0].length() - 1) == ')') {
Expand All @@ -63,6 +63,14 @@ public void onNotificationPosted(StatusBarNotification sbn) {
title = tickerText[0];
}
body = tickerText[1];
} else {
String[] bodySplit = body.split(":");
if (bodySplit.length == 1 || body.split("\\s")[0].equals(""))
senderName = title.split("\\s\\(")[0];
else {
senderName = bodySplit[0];
body = bodySplit[1];
}
}
ID = StringToA(title);
}
Expand Down

0 comments on commit c2e18e2

Please sign in to comment.