Skip to content

Commit

Permalink
Fix group messages not being classified correctly (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
SilverTuxedo authored Jan 27, 2022
1 parent 0e39975 commit f86510c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ android {
minSdkVersion 26
targetSdkVersion 30
versionCode 1
versionName "1.1.0"
versionName "1.1.1"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ public boolean shouldIgnoreNotification(@NonNull StatusBarNotification sbn) {
}

Conversation conversation = new Conversation(sbn.getNotification());
boolean hasMultipleAuthors = conversation.getAuthors().size() > 1;
boolean isGroupMessage = conversation.getAuthors().size() > 1 || conversation.hasTitle();

boolean isAllowed = (
hasMultipleAuthors && m_echoingMode == EchoingMode.GROUPS_ONLY
|| !hasMultipleAuthors && m_echoingMode == EchoingMode.DIRECT_MESSAGES_ONLY);
isGroupMessage && m_echoingMode == EchoingMode.GROUPS_ONLY
|| !isGroupMessage && m_echoingMode == EchoingMode.DIRECT_MESSAGES_ONLY);

return !isAllowed;
}
Expand Down

0 comments on commit f86510c

Please sign in to comment.