mirror of
https://github.com/moparisthebest/Conversations
synced 2024-11-28 11:42:15 -05:00
treat private, non-anonymous mucs like 1:1 chats notification wise
This commit is contained in:
parent
db05d26433
commit
f7634a85be
@ -519,6 +519,13 @@ public class Conversation extends AbstractEntity implements Blockable {
|
||||
return getContact().getOtrFingerprints().contains(getOtrFingerprint());
|
||||
}
|
||||
|
||||
/**
|
||||
* short for is Private and Non-anonymous
|
||||
*/
|
||||
public boolean isPnNA() {
|
||||
return mode == MODE_SINGLE || (getMucOptions().membersOnly() && getMucOptions().nonanonymous());
|
||||
}
|
||||
|
||||
public synchronized MucOptions getMucOptions() {
|
||||
if (this.mucOptions == null) {
|
||||
this.mucOptions = new MucOptions(this);
|
||||
|
@ -64,7 +64,7 @@ public class NotificationService {
|
||||
return (message.getStatus() == Message.STATUS_RECEIVED)
|
||||
&& notificationsEnabled()
|
||||
&& !message.getConversation().isMuted()
|
||||
&& (message.getConversation().getMode() == Conversation.MODE_SINGLE
|
||||
&& (message.getConversation().isPnNA()
|
||||
|| conferenceNotificationsEnabled()
|
||||
|| wasHighlightedOrPrivate(message)
|
||||
);
|
||||
|
@ -108,8 +108,8 @@
|
||||
<string name="pref_vibrate_summary">Also vibrate when a new message arrives</string>
|
||||
<string name="pref_sound">Sound</string>
|
||||
<string name="pref_sound_summary">Play ringtone with notification</string>
|
||||
<string name="pref_conference_notifications">Conference notifications</string>
|
||||
<string name="pref_conference_notifications_summary">Always notify when a new conference message arrives instead of only when highlighted</string>
|
||||
<string name="pref_conference_notifications">Notifications in Public Conferences</string>
|
||||
<string name="pref_conference_notifications_summary">Always notify when a message arrives in a public conference instead of only when highlighted</string>
|
||||
<string name="pref_notification_grace_period">Notification grace period</string>
|
||||
<string name="pref_notification_grace_period_summary">Disable notifications for a short time after a carbon copy was received</string>
|
||||
<string name="pref_advanced_options">Advanced Options</string>
|
||||
|
@ -83,7 +83,7 @@
|
||||
android:title="@string/pref_sound" />
|
||||
|
||||
<CheckBoxPreference
|
||||
android:defaultValue="true"
|
||||
android:defaultValue="false"
|
||||
android:dependency="show_notification"
|
||||
android:key="always_notify_in_conference"
|
||||
android:summary="@string/pref_conference_notifications_summary"
|
||||
|
Loading…
Reference in New Issue
Block a user