Prepare notifications.

This commit is contained in:
B. Petersen
2016-12-21 18:13:04 +01:00
parent a2768728d3
commit 665a2cdfd0
3 changed files with 17 additions and 17 deletions
@@ -138,8 +138,8 @@ public class MrMailbox {
return new MrChatlist(MrMailboxGetChatlist(m_hMailbox));
}
public static MrChat getChat(int contact_id) {
return new MrChat(MrMailboxGetChat(m_hMailbox, contact_id));
public static MrChat getChat(int chat_id) {
return new MrChat(MrMailboxGetChat(m_hMailbox, chat_id));
}
public native static int markseenMsg (int msg_id);
@@ -376,11 +376,24 @@ public class NotificationsController {
if( chat_id == opened_dialog_id && ApplicationLoader.isScreenOn ) {
playInChatSound();
return;
}
else {
SharedPreferences preferences = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Context.MODE_PRIVATE);
int notifyOverride = getNotifyOverride(preferences, chat_id);
if (notifyOverride == 2) {
return; // muted
}
MrChat mrChat = MrMailbox.getChat(chat_id);
boolean isGroupChat = mrChat.getType()==MrChat.MR_CHAT_GROUP;
if( isGroupChat && mrChat.getId()==MrChat.MR_CHAT_ID_DEADDROP ) {
if( ) {
}
}
int popup = preferences.getInt(isGroupChat ? "popupGroup" : "popupAll", 0);
/* old func:
public void processNewMessages(final ArrayList<MessageObject> messageObjects, final boolean isLast)
if (messageObjects.isEmpty()) {
@@ -154,19 +154,6 @@ public class TLRPC {
public ChatParticipants participants;
}
public static class InputUser extends TLObject {
public int user_id;
}
public static class TL_inputUserEmpty extends InputUser {
}
public static class TL_inputUserSelf extends InputUser {
}
public static class TL_inputUser extends InputUser {
}
public static class WebPage extends TLObject {
public int flags;
public long id;
@@ -550,7 +537,7 @@ public class TLRPC {
public String message;
public MessageMedia media;
public int flags;
public boolean mentioned;
public final boolean mentioned = false;
public boolean media_unread;
public boolean out;
public boolean unread;