Java Code Examples for org.telegram.messenger.NotificationCenter#chatDidFailCreate()
The following examples show how to use
org.telegram.messenger.NotificationCenter#chatDidFailCreate() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GroupCreateFinalActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void didReceivedNotification(int id, int account, Object... args) { if (id == NotificationCenter.updateInterfaces) { if (listView == null) { return; } int mask = (Integer) args[0]; if ((mask & MessagesController.UPDATE_MASK_AVATAR) != 0 || (mask & MessagesController.UPDATE_MASK_NAME) != 0 || (mask & MessagesController.UPDATE_MASK_STATUS) != 0) { int count = listView.getChildCount(); for (int a = 0; a < count; a++) { View child = listView.getChildAt(a); if (child instanceof GroupCreateUserCell) { ((GroupCreateUserCell) child).update(mask); } } } } else if (id == NotificationCenter.chatDidFailCreate) { reqId = 0; donePressed = false; showEditDoneProgress(false); if (editText != null) { editText.setEnabled(true); } } else if (id == NotificationCenter.chatDidCreated) { reqId = 0; int chat_id = (Integer) args[0]; NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.closeChats); Bundle args2 = new Bundle(); args2.putInt("chat_id", chat_id); presentFragment(new ChatActivity(args2), true); if (uploadedAvatar != null) { MessagesController.getInstance(currentAccount).changeChatAvatar(chat_id, uploadedAvatar); } } }
Example 2
Source File: GroupCreateFinalActivity.java From TelePlus-Android with GNU General Public License v2.0 | 5 votes |
@Override public void didReceivedNotification(int id, int account, Object... args) { if (id == NotificationCenter.updateInterfaces) { if (listView == null) { return; } int mask = (Integer) args[0]; if ((mask & MessagesController.UPDATE_MASK_AVATAR) != 0 || (mask & MessagesController.UPDATE_MASK_NAME) != 0 || (mask & MessagesController.UPDATE_MASK_STATUS) != 0) { int count = listView.getChildCount(); for (int a = 0; a < count; a++) { View child = listView.getChildAt(a); if (child instanceof GroupCreateUserCell) { ((GroupCreateUserCell) child).update(mask); } } } } else if (id == NotificationCenter.chatDidFailCreate) { reqId = 0; donePressed = false; showEditDoneProgress(false); if (editText != null) { editText.setEnabled(true); } } else if (id == NotificationCenter.chatDidCreated) { reqId = 0; int chat_id = (Integer) args[0]; NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.closeChats); Bundle args2 = new Bundle(); args2.putInt("chat_id", chat_id); presentFragment(new ChatActivity(args2), true); if (uploadedAvatar != null) { MessagesController.getInstance(currentAccount).changeChatAvatar(chat_id, uploadedAvatar); } } }
Example 3
Source File: GroupCreateFinalActivity.java From Telegram-FOSS with GNU General Public License v2.0 | 4 votes |
@Override public void didReceivedNotification(int id, int account, Object... args) { if (id == NotificationCenter.updateInterfaces) { if (listView == null) { return; } int mask = (Integer) args[0]; if ((mask & MessagesController.UPDATE_MASK_AVATAR) != 0 || (mask & MessagesController.UPDATE_MASK_NAME) != 0 || (mask & MessagesController.UPDATE_MASK_STATUS) != 0) { int count = listView.getChildCount(); for (int a = 0; a < count; a++) { View child = listView.getChildAt(a); if (child instanceof GroupCreateUserCell) { ((GroupCreateUserCell) child).update(mask); } } } } else if (id == NotificationCenter.chatDidFailCreate) { reqId = 0; donePressed = false; showEditDoneProgress(false); if (editText != null) { editText.setEnabled(true); } if (delegate != null) { delegate.didFailChatCreation(); } } else if (id == NotificationCenter.chatDidCreated) { reqId = 0; int chat_id = (Integer) args[0]; if (delegate != null) { delegate.didFinishChatCreation(this, chat_id); } else { NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.closeChats); Bundle args2 = new Bundle(); args2.putInt("chat_id", chat_id); presentFragment(new ChatActivity(args2), true); } if (uploadedAvatar != null) { MessagesController.getInstance(currentAccount).changeChatAvatar(chat_id, uploadedAvatar, avatar, avatarBig); } } }
Example 4
Source File: GroupCreateFinalActivity.java From Telegram with GNU General Public License v2.0 | 4 votes |
@Override public void didReceivedNotification(int id, int account, Object... args) { if (id == NotificationCenter.updateInterfaces) { if (listView == null) { return; } int mask = (Integer) args[0]; if ((mask & MessagesController.UPDATE_MASK_AVATAR) != 0 || (mask & MessagesController.UPDATE_MASK_NAME) != 0 || (mask & MessagesController.UPDATE_MASK_STATUS) != 0) { int count = listView.getChildCount(); for (int a = 0; a < count; a++) { View child = listView.getChildAt(a); if (child instanceof GroupCreateUserCell) { ((GroupCreateUserCell) child).update(mask); } } } } else if (id == NotificationCenter.chatDidFailCreate) { reqId = 0; donePressed = false; showEditDoneProgress(false); if (editText != null) { editText.setEnabled(true); } if (delegate != null) { delegate.didFailChatCreation(); } } else if (id == NotificationCenter.chatDidCreated) { reqId = 0; int chat_id = (Integer) args[0]; if (delegate != null) { delegate.didFinishChatCreation(this, chat_id); } else { NotificationCenter.getInstance(currentAccount).postNotificationName(NotificationCenter.closeChats); Bundle args2 = new Bundle(); args2.putInt("chat_id", chat_id); presentFragment(new ChatActivity(args2), true); } if (uploadedAvatar != null) { MessagesController.getInstance(currentAccount).changeChatAvatar(chat_id, uploadedAvatar, avatar, avatarBig); } } }