mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Sending text messages.
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -554,7 +554,7 @@ public class NotificationsController {
|
||||
public void processLoadedUnreadMessages(final HashMap<Long, Integer> dialogs, final ArrayList<TLRPC.Message> messages, final ArrayList<TLRPC.User> users, final ArrayList<TLRPC.Chat> chats, final ArrayList<TLRPC.EncryptedChat> encryptedChats) {
|
||||
MessagesController.getInstance().putUsers(users, true);
|
||||
MessagesController.getInstance().putChats(chats, true);
|
||||
MessagesController.getInstance().putEncryptedChats(encryptedChats, true);
|
||||
//MessagesController.getInstance().putEncryptedChats(encryptedChats, true);
|
||||
|
||||
notificationsQueue.postRunnable(new Runnable() {
|
||||
@Override
|
||||
|
||||
@@ -183,6 +183,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
protected class DelayedMessage {
|
||||
public TLObject sendRequest;
|
||||
public TLRPC.TL_decryptedMessage sendEncryptedRequest;
|
||||
@@ -1118,10 +1119,12 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
entities, replyMarkup, params);
|
||||
}
|
||||
|
||||
/*
|
||||
public void sendMessageLocation(TLRPC.MessageMedia location, long peer, MessageObject reply_to_msg, TLRPC.ReplyMarkup replyMarkup, HashMap<String, String> params) {
|
||||
sendMessage__(null, location, null, null, null, null, peer, null, reply_to_msg, null, true, null,
|
||||
replyMarkup, params);
|
||||
}
|
||||
*/
|
||||
|
||||
public void sendMessagePhoto(TLRPC.TL_photo photo, String path, long peer, MessageObject reply_to_msg, TLRPC.ReplyMarkup replyMarkup, HashMap<String, String> params) {
|
||||
sendMessage__(null, null, photo, null, null, null, peer, path, reply_to_msg, null, true, null,
|
||||
@@ -1151,8 +1154,8 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
originalPath = params.get("originalPath");
|
||||
}
|
||||
|
||||
TLRPC.Message newMsg = null;
|
||||
MessageObject newMsgObj = null;
|
||||
TLRPC.Message newMsg = null; // data
|
||||
MessageObject newMsgObj = null; // drawing
|
||||
int type = -1;
|
||||
int lower_id = (int) peer;
|
||||
//int high_id = (int) (peer >> 32);
|
||||
@@ -1356,7 +1359,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
if (newMsg.attachPath == null) {
|
||||
newMsg.attachPath = "";
|
||||
}
|
||||
newMsg.local_id = newMsg.id = UserConfig.getNewMessageId();
|
||||
/*newMsg.local_id =*/ newMsg.id = UserConfig.getNewMessageId();
|
||||
newMsg.out = true;
|
||||
/*if (isChannel && sendToPeer != null) {
|
||||
newMsg.from_id = -sendToPeer.channel_id;
|
||||
@@ -1509,90 +1512,15 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
// SEND MESSAGE
|
||||
// -------------------------------------------------------------------------------------
|
||||
|
||||
if (type == 0 /*|| type == 9 && message != null && encryptedChat != null*/ ) {
|
||||
/*if (encryptedChat == null)*/ {
|
||||
/*if (sendToPeers != null) {
|
||||
TLRPC.TL_messages_sendBroadcast reqSend = new TLRPC.TL_messages_sendBroadcast();
|
||||
ArrayList<Long> random_ids = new ArrayList<>();
|
||||
for (int a = 0; a < sendToPeers.size(); a++) {
|
||||
random_ids.add(Utilities.random.nextLong());
|
||||
}
|
||||
reqSend.message = message;
|
||||
reqSend.contacts = sendToPeers;
|
||||
reqSend.media = new TLRPC.TL_inputMediaEmpty();
|
||||
reqSend.random_id = random_ids;
|
||||
performSendMessageRequest(reqSend, newMsgObj, null);
|
||||
} else */ {
|
||||
TLRPC.TL_messages_sendMessage reqSend = new TLRPC.TL_messages_sendMessage();
|
||||
reqSend.message = message;
|
||||
reqSend.clear_draft = true;//retryMessageObject == null;
|
||||
if (newMsg.to_id instanceof TLRPC.TL_peerChannel) {
|
||||
reqSend.silent = ApplicationLoader.applicationContext.getSharedPreferences("Notifications", Activity.MODE_PRIVATE).getBoolean("silent_" + peer, false);
|
||||
}
|
||||
reqSend.peer = null;//sendToPeer;
|
||||
reqSend.random_id = newMsg.random_id;
|
||||
if (reply_to_msg != null) {
|
||||
reqSend.flags |= 1;
|
||||
reqSend.reply_to_msg_id = reply_to_msg.getId();
|
||||
}
|
||||
if (!searchLinks) {
|
||||
reqSend.no_webpage = true;
|
||||
}
|
||||
if (entities != null && !entities.isEmpty()) {
|
||||
reqSend.entities = entities;
|
||||
reqSend.flags |= 8;
|
||||
}
|
||||
long hChat = MrMailbox.MrMailboxGetChatById(MrMailbox.hMailbox, (int)peer);
|
||||
|
||||
performSendMessageRequest(reqSend, newMsgObj, null);
|
||||
long hChat = MrMailbox.MrMailboxGetChatById();
|
||||
TODO: send message here ...
|
||||
|
||||
/*if (retryMessageObject == null)*/ {
|
||||
DraftQuery.cleanDraft(peer, false);
|
||||
}
|
||||
}
|
||||
} /* else {
|
||||
TLRPC.TL_decryptedMessage reqSend;
|
||||
if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 46) {
|
||||
reqSend = new TLRPC.TL_decryptedMessage();
|
||||
reqSend.ttl = newMsg.ttl;
|
||||
if (entities != null && !entities.isEmpty()) {
|
||||
reqSend.entities = entities;
|
||||
reqSend.flags |= TLRPC.MESSAGE_FLAG_HAS_ENTITIES;
|
||||
}
|
||||
if (reply_to_msg != null && reply_to_msg.messageOwner.random_id != 0) {
|
||||
reqSend.reply_to_random_id = reply_to_msg.messageOwner.random_id;
|
||||
reqSend.flags |= TLRPC.MESSAGE_FLAG_REPLY;
|
||||
}
|
||||
} else if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
|
||||
reqSend = new TLRPC.TL_decryptedMessage_layer17();
|
||||
reqSend.ttl = newMsg.ttl;
|
||||
} else {
|
||||
reqSend = new TLRPC.TL_decryptedMessage_layer8();
|
||||
reqSend.random_bytes = new byte[15];
|
||||
Utilities.random.nextBytes(reqSend.random_bytes);
|
||||
}
|
||||
if (params != null && params.get("bot_name") != null) {
|
||||
reqSend.via_bot_name = params.get("bot_name");
|
||||
reqSend.flags |= TLRPC.MESSAGE_FLAG_HAS_BOT_ID;
|
||||
}
|
||||
reqSend.random_id = newMsg.random_id;
|
||||
reqSend.message = message;
|
||||
if (webPage != null && webPage.url != null) {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaWebPage();
|
||||
reqSend.media.url = webPage.url;
|
||||
reqSend.flags |= TLRPC.MESSAGE_FLAG_HAS_MEDIA;
|
||||
} else {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaEmpty();
|
||||
}
|
||||
//SecretChatHelper.getInstance().performSendEncryptedRequest(reqSend, newMsgObj.messageOwner, encryptedChat, null, null, newMsgObj);
|
||||
if (retryMessageObject == null) {
|
||||
DraftQuery.cleanDraft(peer, false);
|
||||
}
|
||||
}
|
||||
*/
|
||||
} else if (type >= 1 && type <= 3 || type >= 5 && type <= 8 /*|| type == 9 && encryptedChat != null*/) {
|
||||
/*if (encryptedChat == null)*/ {
|
||||
if (type == 0 /*|| type == 9 && message != null && encryptedChat != null*/ )
|
||||
{
|
||||
newMsg.id = MrMailbox.MrChatSendMsg(hChat, newMsg.message);
|
||||
DraftQuery.cleanDraft(peer, false);
|
||||
}
|
||||
else if (type >= 1 && type <= 3 || type >= 5 && type <= 8 /*|| type == 9 && encryptedChat != null*/) {
|
||||
{
|
||||
TLRPC.InputMedia inputMedia = null;
|
||||
DelayedMessage delayedMessage = null;
|
||||
if (type == 1) {
|
||||
@@ -1714,24 +1642,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
|
||||
TLObject reqSend;
|
||||
|
||||
/*if (sendToPeers != null) {
|
||||
TLRPC.TL_messages_sendBroadcast request = new TLRPC.TL_messages_sendBroadcast();
|
||||
ArrayList<Long> random_ids = new ArrayList<>();
|
||||
for (int a = 0; a < sendToPeers.size(); a++) {
|
||||
random_ids.add(Utilities.random.nextLong());
|
||||
}
|
||||
request.contacts = sendToPeers;
|
||||
request.media = inputMedia;
|
||||
request.random_id = random_ids;
|
||||
request.message = "";
|
||||
if (delayedMessage != null) {
|
||||
delayedMessage.sendRequest = request;
|
||||
}
|
||||
reqSend = request;
|
||||
if (retryMessageObject == null) {
|
||||
DraftQuery.cleanDraft(peer, false);
|
||||
}
|
||||
} else */ {
|
||||
{
|
||||
TLRPC.TL_messages_sendMedia request = new TLRPC.TL_messages_sendMedia();
|
||||
request.peer = null;//sendToPeer;
|
||||
if (newMsg.to_id instanceof TLRPC.TL_peerChannel) {
|
||||
@@ -1777,273 +1688,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
performSendMessageRequest(reqSend, newMsgObj, null);
|
||||
}
|
||||
}
|
||||
} /* else {
|
||||
TLRPC.TL_decryptedMessage reqSend;
|
||||
if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 46) {
|
||||
reqSend = new TLRPC.TL_decryptedMessage();
|
||||
reqSend.ttl = newMsg.ttl;
|
||||
if (entities != null && !entities.isEmpty()) {
|
||||
reqSend.entities = entities;
|
||||
reqSend.flags |= TLRPC.MESSAGE_FLAG_HAS_ENTITIES;
|
||||
}
|
||||
if (reply_to_msg != null && reply_to_msg.messageOwner.random_id != 0) {
|
||||
reqSend.reply_to_random_id = reply_to_msg.messageOwner.random_id;
|
||||
reqSend.flags |= TLRPC.MESSAGE_FLAG_REPLY;
|
||||
}
|
||||
reqSend.flags |= TLRPC.MESSAGE_FLAG_HAS_MEDIA;
|
||||
} else if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
|
||||
reqSend = new TLRPC.TL_decryptedMessage_layer17();
|
||||
reqSend.ttl = newMsg.ttl;
|
||||
} else {
|
||||
reqSend = new TLRPC.TL_decryptedMessage_layer8();
|
||||
reqSend.random_bytes = new byte[15];
|
||||
Utilities.random.nextBytes(reqSend.random_bytes);
|
||||
}
|
||||
if (params != null && params.get("bot_name") != null) {
|
||||
reqSend.via_bot_name = params.get("bot_name");
|
||||
reqSend.flags |= TLRPC.MESSAGE_FLAG_HAS_BOT_ID;
|
||||
}
|
||||
reqSend.random_id = newMsg.random_id;
|
||||
reqSend.message = "";
|
||||
if (type == 1) {
|
||||
if (location instanceof TLRPC.TL_messageMediaVenue && AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 46) {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaVenue();
|
||||
reqSend.media.address = location.address;
|
||||
reqSend.media.title = location.title;
|
||||
reqSend.media.provider = location.provider;
|
||||
reqSend.media.venue_id = location.venue_id;
|
||||
} else {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaGeoPoint();
|
||||
}
|
||||
reqSend.media.lat = location.geo.lat;
|
||||
reqSend.media._long = location.geo._long;
|
||||
//SecretChatHelper.getInstance().performSendEncryptedRequest(reqSend, newMsgObj.messageOwner, encryptedChat, null, null, newMsgObj);
|
||||
} else if (type == 2 || type == 9 && photo != null) {
|
||||
TLRPC.PhotoSize small = photo.sizes.get(0);
|
||||
TLRPC.PhotoSize big = photo.sizes.get(photo.sizes.size() - 1);
|
||||
ImageLoader.fillPhotoSizeWithBytes(small);
|
||||
if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 46) {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaPhoto();
|
||||
reqSend.media.caption = photo.caption != null ? photo.caption : "";
|
||||
if (small.bytes != null) {
|
||||
((TLRPC.TL_decryptedMessageMediaPhoto) reqSend.media).thumb = small.bytes;
|
||||
} else {
|
||||
((TLRPC.TL_decryptedMessageMediaPhoto) reqSend.media).thumb = new byte[0];
|
||||
}
|
||||
} else {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaPhoto_layer8();
|
||||
if (small.bytes != null) {
|
||||
((TLRPC.TL_decryptedMessageMediaPhoto_layer8) reqSend.media).thumb = small.bytes;
|
||||
} else {
|
||||
((TLRPC.TL_decryptedMessageMediaPhoto_layer8) reqSend.media).thumb = new byte[0];
|
||||
}
|
||||
}
|
||||
reqSend.media.thumb_h = small.h;
|
||||
reqSend.media.thumb_w = small.w;
|
||||
reqSend.media.w = big.w;
|
||||
reqSend.media.h = big.h;
|
||||
reqSend.media.size = big.size;
|
||||
if (big.location.key == null) {
|
||||
DelayedMessage delayedMessage = new DelayedMessage();
|
||||
delayedMessage.originalPath = originalPath;
|
||||
delayedMessage.sendEncryptedRequest = reqSend;
|
||||
delayedMessage.type = 0;
|
||||
delayedMessage.obj = newMsgObj;
|
||||
delayedMessage.encryptedChat = encryptedChat;
|
||||
if (path != null && path.length() > 0 && path.startsWith("http")) {
|
||||
delayedMessage.httpLocation = path;
|
||||
} else {
|
||||
delayedMessage.location = photo.sizes.get(photo.sizes.size() - 1).location;
|
||||
}
|
||||
performSendDelayedMessage(delayedMessage);
|
||||
} else {
|
||||
TLRPC.TL_inputEncryptedFile encryptedFile = new TLRPC.TL_inputEncryptedFile();
|
||||
encryptedFile.id = big.location.volume_id;
|
||||
encryptedFile.access_hash = big.location.secret;
|
||||
reqSend.media.key = big.location.key;
|
||||
reqSend.media.iv = big.location.iv;
|
||||
//SecretChatHelper.getInstance().performSendEncryptedRequest(reqSend, newMsgObj.messageOwner, encryptedChat, encryptedFile, null, newMsgObj);
|
||||
}
|
||||
} else if (type == 3) {
|
||||
ImageLoader.fillPhotoSizeWithBytes(document.thumb);
|
||||
if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 46) {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaVideo();
|
||||
if (document.thumb != null && document.thumb.bytes != null) {
|
||||
((TLRPC.TL_decryptedMessageMediaVideo) reqSend.media).thumb = document.thumb.bytes;
|
||||
} else {
|
||||
((TLRPC.TL_decryptedMessageMediaVideo) reqSend.media).thumb = new byte[0];
|
||||
}
|
||||
} else if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaVideo_layer17();
|
||||
if (document.thumb != null && document.thumb.bytes != null) {
|
||||
((TLRPC.TL_decryptedMessageMediaVideo_layer17) reqSend.media).thumb = document.thumb.bytes;
|
||||
} else {
|
||||
((TLRPC.TL_decryptedMessageMediaVideo_layer17) reqSend.media).thumb = new byte[0];
|
||||
}
|
||||
} else {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaVideo_layer8();
|
||||
if (document.thumb != null && document.thumb.bytes != null) {
|
||||
((TLRPC.TL_decryptedMessageMediaVideo_layer8) reqSend.media).thumb = document.thumb.bytes;
|
||||
} else {
|
||||
((TLRPC.TL_decryptedMessageMediaVideo_layer8) reqSend.media).thumb = new byte[0];
|
||||
}
|
||||
}
|
||||
reqSend.media.caption = document.caption != null ? document.caption : "";
|
||||
reqSend.media.mime_type = "video/mp4";
|
||||
reqSend.media.size = document.size;
|
||||
for (int a = 0; a < document.attributes.size(); a++) {
|
||||
TLRPC.DocumentAttribute attribute = document.attributes.get(a);
|
||||
if (attribute instanceof TLRPC.TL_documentAttributeVideo) {
|
||||
reqSend.media.w = attribute.w;
|
||||
reqSend.media.h = attribute.h;
|
||||
reqSend.media.duration = attribute.duration;
|
||||
break;
|
||||
}
|
||||
}
|
||||
reqSend.media.thumb_h = document.thumb.h;
|
||||
reqSend.media.thumb_w = document.thumb.w;
|
||||
if (document.access_hash == 0) {
|
||||
DelayedMessage delayedMessage = new DelayedMessage();
|
||||
delayedMessage.originalPath = originalPath;
|
||||
delayedMessage.sendEncryptedRequest = reqSend;
|
||||
delayedMessage.type = 1;
|
||||
delayedMessage.obj = newMsgObj;
|
||||
delayedMessage.encryptedChat = encryptedChat;
|
||||
delayedMessage.documentLocation = document;
|
||||
delayedMessage.videoEditedInfo = videoEditedInfo;
|
||||
performSendDelayedMessage(delayedMessage);
|
||||
} else {
|
||||
TLRPC.TL_inputEncryptedFile encryptedFile = new TLRPC.TL_inputEncryptedFile();
|
||||
encryptedFile.id = document.id;
|
||||
encryptedFile.access_hash = document.access_hash;
|
||||
reqSend.media.key = document.key;
|
||||
reqSend.media.iv = document.iv;
|
||||
//SecretChatHelper.getInstance().performSendEncryptedRequest(reqSend, newMsgObj.messageOwner, encryptedChat, encryptedFile, null, newMsgObj);
|
||||
}
|
||||
} else if (type == 6) {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaContact();
|
||||
reqSend.media.phone_number = user.phone;
|
||||
reqSend.media.first_name = user.first_name;
|
||||
reqSend.media.last_name = user.last_name;
|
||||
reqSend.media.user_id = user.id;
|
||||
//SecretChatHelper.getInstance().performSendEncryptedRequest(reqSend, newMsgObj.messageOwner, encryptedChat, null, null, newMsgObj);
|
||||
} else if (type == 7 || type == 9 && document != null) {
|
||||
if (MessageObject.isStickerDocument(document)) {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaExternalDocument();
|
||||
reqSend.media.id = document.id;
|
||||
reqSend.media.date = document.date;
|
||||
reqSend.media.access_hash = document.access_hash;
|
||||
reqSend.media.mime_type = document.mime_type;
|
||||
reqSend.media.size = document.size;
|
||||
reqSend.media.dc_id = document.dc_id;
|
||||
reqSend.media.attributes = document.attributes;
|
||||
if (document.thumb == null) {
|
||||
((TLRPC.TL_decryptedMessageMediaExternalDocument) reqSend.media).thumb = new TLRPC.TL_photoSizeEmpty();
|
||||
((TLRPC.TL_decryptedMessageMediaExternalDocument) reqSend.media).thumb.type = "s";
|
||||
} else {
|
||||
((TLRPC.TL_decryptedMessageMediaExternalDocument) reqSend.media).thumb = document.thumb;
|
||||
}
|
||||
//SecretChatHelper.getInstance().performSendEncryptedRequest(reqSend, newMsgObj.messageOwner, encryptedChat, null, null, newMsgObj);
|
||||
} else {
|
||||
ImageLoader.fillPhotoSizeWithBytes(document.thumb);
|
||||
if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 46) {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaDocument();
|
||||
reqSend.media.attributes = document.attributes;
|
||||
reqSend.media.caption = document.caption != null ? document.caption : "";
|
||||
if (document.thumb != null && document.thumb.bytes != null) {
|
||||
((TLRPC.TL_decryptedMessageMediaDocument) reqSend.media).thumb = document.thumb.bytes;
|
||||
reqSend.media.thumb_h = document.thumb.h;
|
||||
reqSend.media.thumb_w = document.thumb.w;
|
||||
} else {
|
||||
((TLRPC.TL_decryptedMessageMediaDocument) reqSend.media).thumb = new byte[0];
|
||||
reqSend.media.thumb_h = 0;
|
||||
reqSend.media.thumb_w = 0;
|
||||
}
|
||||
} else {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaDocument_layer8();
|
||||
reqSend.media.file_name = FileLoader.getDocumentFileName(document);
|
||||
if (document.thumb != null && document.thumb.bytes != null) {
|
||||
((TLRPC.TL_decryptedMessageMediaDocument_layer8) reqSend.media).thumb = document.thumb.bytes;
|
||||
reqSend.media.thumb_h = document.thumb.h;
|
||||
reqSend.media.thumb_w = document.thumb.w;
|
||||
} else {
|
||||
((TLRPC.TL_decryptedMessageMediaDocument_layer8) reqSend.media).thumb = new byte[0];
|
||||
reqSend.media.thumb_h = 0;
|
||||
reqSend.media.thumb_w = 0;
|
||||
}
|
||||
}
|
||||
reqSend.media.size = document.size;
|
||||
reqSend.media.mime_type = document.mime_type;
|
||||
|
||||
if (document.key == null) {
|
||||
DelayedMessage delayedMessage = new DelayedMessage();
|
||||
delayedMessage.originalPath = originalPath;
|
||||
delayedMessage.sendEncryptedRequest = reqSend;
|
||||
delayedMessage.type = 2;
|
||||
delayedMessage.obj = newMsgObj;
|
||||
delayedMessage.encryptedChat = encryptedChat;
|
||||
if (path != null && path.length() > 0 && path.startsWith("http")) {
|
||||
delayedMessage.httpLocation = path;
|
||||
}
|
||||
delayedMessage.documentLocation = document;
|
||||
performSendDelayedMessage(delayedMessage);
|
||||
} else {
|
||||
TLRPC.TL_inputEncryptedFile encryptedFile = new TLRPC.TL_inputEncryptedFile();
|
||||
encryptedFile.id = document.id;
|
||||
encryptedFile.access_hash = document.access_hash;
|
||||
reqSend.media.key = document.key;
|
||||
reqSend.media.iv = document.iv;
|
||||
//SecretChatHelper.getInstance().performSendEncryptedRequest(reqSend, newMsgObj.messageOwner, encryptedChat, encryptedFile, null, newMsgObj);
|
||||
}
|
||||
}
|
||||
} else if (type == 8) {
|
||||
DelayedMessage delayedMessage = new DelayedMessage();
|
||||
delayedMessage.encryptedChat = encryptedChat;
|
||||
delayedMessage.sendEncryptedRequest = reqSend;
|
||||
delayedMessage.obj = newMsgObj;
|
||||
delayedMessage.documentLocation = document;
|
||||
delayedMessage.type = 3;
|
||||
|
||||
if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 46) {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaDocument();
|
||||
reqSend.media.attributes = document.attributes;
|
||||
reqSend.media.caption = document.caption != null ? document.caption : "";
|
||||
if (document.thumb != null && document.thumb.bytes != null) {
|
||||
((TLRPC.TL_decryptedMessageMediaDocument) reqSend.media).thumb = document.thumb.bytes;
|
||||
reqSend.media.thumb_h = document.thumb.h;
|
||||
reqSend.media.thumb_w = document.thumb.w;
|
||||
} else {
|
||||
((TLRPC.TL_decryptedMessageMediaDocument) reqSend.media).thumb = new byte[0];
|
||||
reqSend.media.thumb_h = 0;
|
||||
reqSend.media.thumb_w = 0;
|
||||
}
|
||||
reqSend.media.mime_type = document.mime_type;
|
||||
reqSend.media.size = document.size;
|
||||
delayedMessage.originalPath = originalPath;
|
||||
} else {
|
||||
if (AndroidUtilities.getPeerLayerVersion(encryptedChat.layer) >= 17) {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaAudio();
|
||||
} else {
|
||||
reqSend.media = new TLRPC.TL_decryptedMessageMediaAudio_layer8();
|
||||
}
|
||||
for (int a = 0; a < document.attributes.size(); a++) {
|
||||
TLRPC.DocumentAttribute attribute = document.attributes.get(a);
|
||||
if (attribute instanceof TLRPC.TL_documentAttributeAudio) {
|
||||
reqSend.media.duration = attribute.duration;
|
||||
break;
|
||||
}
|
||||
}
|
||||
reqSend.media.mime_type = "audio/ogg";
|
||||
reqSend.media.size = document.size;
|
||||
delayedMessage.type = 3;
|
||||
}
|
||||
performSendDelayedMessage(delayedMessage);
|
||||
}
|
||||
if (retryMessageObject == null) {
|
||||
DraftQuery.cleanDraft(peer, false);
|
||||
}
|
||||
}
|
||||
*/
|
||||
} else if (type == 4) {
|
||||
/*
|
||||
TLRPC.TL_messages_forwardMessages reqSend = new TLRPC.TL_messages_forwardMessages();
|
||||
@@ -2090,6 +1735,9 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
performSendMessageRequest(reqSend, newMsgObj, null);
|
||||
*/
|
||||
}
|
||||
|
||||
MrMailbox.MrChatUnref(hChat);
|
||||
|
||||
} catch (Exception e) {
|
||||
FileLog.e("tmessages", e);
|
||||
//MessagesStorage.getInstance().markMessageAsSendError(newMsg);
|
||||
@@ -2099,127 +1747,10 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
NotificationCenter.getInstance().postNotificationName(NotificationCenter.messageSendError, newMsg.id);
|
||||
//processSentMessage(newMsg.id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void performSendDelayedMessage(final DelayedMessage message) {
|
||||
/*
|
||||
if (message.type == 0) {
|
||||
if (message.httpLocation != null) {
|
||||
putToDelayedMessages(message.httpLocation, message);
|
||||
ImageLoader.getInstance().loadHttpFile(message.httpLocation, "file");
|
||||
} else {
|
||||
if (message.sendRequest != null) {
|
||||
String location = FileLoader.getPathToAttach(message.location).toString();
|
||||
putToDelayedMessages(location, message);
|
||||
FileLoader.getInstance().uploadFile(location, false, true);
|
||||
} else {
|
||||
String location = FileLoader.getPathToAttach(message.location).toString();
|
||||
if (message.sendEncryptedRequest != null && message.location.dc_id != 0) {
|
||||
File file = new File(location);
|
||||
if (!file.exists()) {
|
||||
putToDelayedMessages(FileLoader.getAttachFileName(message.location), message);
|
||||
FileLoader.getInstance().loadFile(message.location, "jpg", 0, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
putToDelayedMessages(location, message);
|
||||
FileLoader.getInstance().uploadFile(location, true, true);
|
||||
}
|
||||
}
|
||||
} else if (message.type == 1) {
|
||||
if (message.videoEditedInfo != null) {
|
||||
String location = message.obj.messageOwner.attachPath;
|
||||
if (location == null) {
|
||||
location = FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE) + "/" + message.documentLocation.id + ".mp4";
|
||||
}
|
||||
putToDelayedMessages(location, message);
|
||||
MediaController.getInstance().scheduleVideoConvert(message.obj);
|
||||
} else {
|
||||
if (message.sendRequest != null) {
|
||||
TLRPC.InputMedia media;
|
||||
if (message.sendRequest instanceof TLRPC.TL_messages_sendMedia) {
|
||||
media = ((TLRPC.TL_messages_sendMedia) message.sendRequest).media;
|
||||
} else {
|
||||
media = ((TLRPC.TL_messages_sendBroadcast) message.sendRequest).media;
|
||||
}
|
||||
if (media.file == null) {
|
||||
String location = message.obj.messageOwner.attachPath;
|
||||
if (location == null) {
|
||||
location = FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE) + "/" + message.documentLocation.id + ".mp4";
|
||||
}
|
||||
putToDelayedMessages(location, message);
|
||||
if (message.obj.videoEditedInfo != null) {
|
||||
FileLoader.getInstance().uploadFile(location, false, false, message.documentLocation.size);
|
||||
} else {
|
||||
FileLoader.getInstance().uploadFile(location, false, false);
|
||||
}
|
||||
} else {
|
||||
String location = FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE) + "/" + message.location.volume_id + "_" + message.location.local_id + ".jpg";
|
||||
putToDelayedMessages(location, message);
|
||||
FileLoader.getInstance().uploadFile(location, false, true);
|
||||
}
|
||||
} else {
|
||||
String location = message.obj.messageOwner.attachPath;
|
||||
if (location == null) {
|
||||
location = FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE) + "/" + message.documentLocation.id + ".mp4";
|
||||
}
|
||||
putToDelayedMessages(location, message);
|
||||
if (message.obj.videoEditedInfo != null) {
|
||||
FileLoader.getInstance().uploadFile(location, true, false, message.documentLocation.size);
|
||||
} else {
|
||||
FileLoader.getInstance().uploadFile(location, true, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (message.type == 2) {
|
||||
if (message.httpLocation != null) {
|
||||
putToDelayedMessages(message.httpLocation, message);
|
||||
ImageLoader.getInstance().loadHttpFile(message.httpLocation, "gif");
|
||||
} else {
|
||||
if (message.sendRequest != null) {
|
||||
TLRPC.InputMedia media;
|
||||
if (message.sendRequest instanceof TLRPC.TL_messages_sendMedia) {
|
||||
media = ((TLRPC.TL_messages_sendMedia) message.sendRequest).media;
|
||||
} else {
|
||||
media = ((TLRPC.TL_messages_sendBroadcast) message.sendRequest).media;
|
||||
}
|
||||
if (media.file == null) {
|
||||
String location = message.obj.messageOwner.attachPath;
|
||||
putToDelayedMessages(location, message);
|
||||
if (message.sendRequest != null) {
|
||||
FileLoader.getInstance().uploadFile(location, false, false);
|
||||
} else {
|
||||
FileLoader.getInstance().uploadFile(location, true, false);
|
||||
}
|
||||
} else if (media.thumb == null && message.location != null) {
|
||||
String location = FileLoader.getInstance().getDirectory(FileLoader.MEDIA_DIR_CACHE) + "/" + message.location.volume_id + "_" + message.location.local_id + ".jpg";
|
||||
putToDelayedMessages(location, message);
|
||||
FileLoader.getInstance().uploadFile(location, false, true);
|
||||
}
|
||||
} else {
|
||||
String location = message.obj.messageOwner.attachPath;
|
||||
if (message.sendEncryptedRequest != null && message.documentLocation.dc_id != 0) {
|
||||
File file = new File(location);
|
||||
if (!file.exists()) {
|
||||
putToDelayedMessages(FileLoader.getAttachFileName(message.documentLocation), message);
|
||||
FileLoader.getInstance().loadFile(message.documentLocation, true, false);
|
||||
return;
|
||||
}
|
||||
}
|
||||
putToDelayedMessages(location, message);
|
||||
FileLoader.getInstance().uploadFile(location, true, false);
|
||||
}
|
||||
}
|
||||
} else if (message.type == 3) {
|
||||
String location = message.obj.messageOwner.attachPath;
|
||||
putToDelayedMessages(location, message);
|
||||
if (message.sendRequest != null) {
|
||||
FileLoader.getInstance().uploadFile(location, false, true);
|
||||
} else {
|
||||
FileLoader.getInstance().uploadFile(location, true, true);
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
protected void stopVideoService(final String path) {
|
||||
@@ -2415,6 +1946,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
private void updateMediaPaths(MessageObject newMsgObj, TLRPC.Message sentMessage, String originalPath, boolean post) {
|
||||
TLRPC.Message newMsg = newMsgObj.messageOwner;
|
||||
if (sentMessage == null) {
|
||||
@@ -2545,6 +2077,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
|
||||
newMsg.media = sentMessage.media;
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
private void putToDelayedMessages(String location, DelayedMessage message) {
|
||||
|
||||
@@ -6475,7 +6475,7 @@ public class TLRPC {
|
||||
result = new TL_messageActionChatCreate();
|
||||
break;
|
||||
case 0x51bdb021:
|
||||
result = new TL_messageActionChatMigrateTo();
|
||||
//result = new TL_messageActionChatMigrateTo();
|
||||
break;
|
||||
case 0x9fbab604:
|
||||
result = new TL_messageActionHistoryClear();
|
||||
@@ -6603,6 +6603,7 @@ public class TLRPC {
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
public static class TL_messageActionChatMigrateTo extends MessageAction {
|
||||
public static int constructor = 0x51bdb021;
|
||||
|
||||
@@ -6616,6 +6617,7 @@ public class TLRPC {
|
||||
stream.writeInt32(channel_id);
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public static class TL_messageActionHistoryClear extends MessageAction {
|
||||
public static int constructor = 0x9fbab604;
|
||||
@@ -20095,13 +20097,13 @@ public class TLRPC {
|
||||
public String attachPath = ""; //custom
|
||||
public HashMap<String, String> params; //custom
|
||||
public long random_id; //custom
|
||||
public int local_id = 0; //custom
|
||||
//public int local_id = 0; //custom
|
||||
public long dialog_id; //custom
|
||||
public int ttl; //custom
|
||||
public int destroyTime; //custom
|
||||
public int layer; //custom
|
||||
public int seq_in; //custom
|
||||
public int seq_out; //custom
|
||||
//public int seq_in; //custom
|
||||
//public int seq_out; //custom
|
||||
public TLRPC.Message replyMessage; //custom
|
||||
|
||||
public static Message TLdeserialize(AbstractSerializedData stream, int constructor, boolean exception) {
|
||||
|
||||
@@ -437,6 +437,7 @@ public class DialogsSearchAdapter extends BaseSearchAdapterRecycler {
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
private void setRecentSearch(ArrayList<RecentSearchObject> arrayList, HashMap<Long, RecentSearchObject> hashMap) {
|
||||
recentSearchObjects = arrayList;
|
||||
recentSearchObjectsById = hashMap;
|
||||
@@ -452,6 +453,7 @@ public class DialogsSearchAdapter extends BaseSearchAdapterRecycler {
|
||||
}
|
||||
notifyDataSetChanged();
|
||||
}
|
||||
*/
|
||||
|
||||
private void searchDialogsInternal(final String query, final int searchId) {
|
||||
if (needMessagesSearch == 2) {
|
||||
@@ -767,10 +769,10 @@ public class DialogsSearchAdapter extends BaseSearchAdapterRecycler {
|
||||
} else if (obj instanceof TLRPC.Chat) {
|
||||
TLRPC.Chat chat = (TLRPC.Chat) obj;
|
||||
MessagesController.getInstance().putChat(chat, true);
|
||||
} else if (obj instanceof TLRPC.EncryptedChat) {
|
||||
} /*else if (obj instanceof TLRPC.EncryptedChat) {
|
||||
TLRPC.EncryptedChat chat = (TLRPC.EncryptedChat) obj;
|
||||
MessagesController.getInstance().putEncryptedChat(chat, true);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
MessagesController.getInstance().putUsers(encUsers, true);
|
||||
searchResult = result;
|
||||
|
||||
@@ -1672,7 +1672,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
builder.setPositiveButton(LocaleController.getString("OK", R.string.OK), new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
MessagesController.getInstance().pinChannelMessage(currentChat, 0, false);
|
||||
//MessagesController.getInstance().pinChannelMessage(currentChat, 0, false);
|
||||
}
|
||||
});
|
||||
builder.setTitle(LocaleController.getString("AppName", R.string.AppName));
|
||||
@@ -1753,7 +1753,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (currentUser != null) {
|
||||
MessagesController.getInstance().blockUser(currentUser.id);
|
||||
}
|
||||
MessagesController.getInstance().reportSpam(dialog_id, currentUser, currentChat);
|
||||
//MessagesController.getInstance().reportSpam(dialog_id, currentUser, currentChat);
|
||||
updateSpamView();
|
||||
if (currentChat != null) {
|
||||
if (ChatObject.isNotInChat(currentChat)) {
|
||||
@@ -1779,7 +1779,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
closeReportSpam.setOnClickListener(new View.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
MessagesController.getInstance().hideReportSpam(dialog_id, currentUser, currentChat);
|
||||
//MessagesController.getInstance().hideReportSpam(dialog_id, currentUser, currentChat);
|
||||
updateSpamView();
|
||||
}
|
||||
});
|
||||
@@ -5212,7 +5212,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
}
|
||||
}
|
||||
|
||||
boolean reloadMegagroup = false;
|
||||
//boolean reloadMegagroup = false;
|
||||
if (!forwardEndReached[0]) {
|
||||
int currentMaxDate = Integer.MIN_VALUE;
|
||||
int currentMinMsgId = Integer.MIN_VALUE;
|
||||
@@ -5229,7 +5229,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (avatarContainer != null && currentEncryptedChat != null && obj.messageOwner.action != null && obj.messageOwner.action instanceof TLRPC.TL_messageEncryptedAction && obj.messageOwner.action.encryptedAction instanceof TLRPC.TL_decryptedMessageActionSetMessageTTL) {
|
||||
avatarContainer.setTime(((TLRPC.TL_decryptedMessageActionSetMessageTTL) obj.messageOwner.action.encryptedAction).ttl_seconds);
|
||||
}
|
||||
if (obj.messageOwner.action instanceof TLRPC.TL_messageActionChatMigrateTo) {
|
||||
/*if (obj.messageOwner.action instanceof TLRPC.TL_messageActionChatMigrateTo) {
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putInt("chat_id", obj.messageOwner.action.channel_id);
|
||||
final BaseFragment lastFragment = parentLayout.fragmentsStack.size() > 0 ? parentLayout.fragmentsStack.get(parentLayout.fragmentsStack.size() - 1) : null;
|
||||
@@ -5254,7 +5254,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
return;
|
||||
} else if (currentChat != null && currentChat.megagroup && (obj.messageOwner.action instanceof TLRPC.TL_messageActionChatAddUser || obj.messageOwner.action instanceof TLRPC.TL_messageActionChatDeleteUser)) {
|
||||
reloadMegagroup = true;
|
||||
}
|
||||
}*/
|
||||
if (obj.isOut() && obj.isSending()) {
|
||||
scrollToLastMessage(false);
|
||||
return;
|
||||
@@ -5353,7 +5353,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
arrayList.add(obj);
|
||||
}
|
||||
obj.checkLayout();
|
||||
if (obj.messageOwner.action instanceof TLRPC.TL_messageActionChatMigrateTo) {
|
||||
/*if (obj.messageOwner.action instanceof TLRPC.TL_messageActionChatMigrateTo) {
|
||||
final Bundle bundle = new Bundle();
|
||||
bundle.putInt("chat_id", obj.messageOwner.action.channel_id);
|
||||
final BaseFragment lastFragment = parentLayout.fragmentsStack.size() > 0 ? parentLayout.fragmentsStack.get(parentLayout.fragmentsStack.size() - 1) : null;
|
||||
@@ -5378,7 +5378,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
return;
|
||||
} else if (currentChat != null && currentChat.megagroup && (obj.messageOwner.action instanceof TLRPC.TL_messageActionChatAddUser || obj.messageOwner.action instanceof TLRPC.TL_messageActionChatDeleteUser)) {
|
||||
reloadMegagroup = true;
|
||||
}
|
||||
}*/
|
||||
if (minDate[0] == 0 || obj.messageOwner.date < minDate[0]) {
|
||||
minDate[0] = obj.messageOwner.date;
|
||||
}
|
||||
@@ -5522,9 +5522,9 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
updateTitle();
|
||||
checkAndUpdateAvatar();
|
||||
}
|
||||
if (reloadMegagroup) {
|
||||
/*if (reloadMegagroup) {
|
||||
MessagesController.getInstance().loadFullChat(currentChat.id, 0, true);
|
||||
}
|
||||
}*/
|
||||
}
|
||||
} else if (id == NotificationCenter.closeChats) {
|
||||
if (args != null && args.length > 0) {
|
||||
@@ -6320,7 +6320,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
|
||||
if (isOpen) {
|
||||
openAnimationEnded = true;
|
||||
if (currentUser != null) {
|
||||
MessagesController.getInstance().loadFullUser(currentUser, classGuid, false);
|
||||
//MessagesController.getInstance().loadFullUser(currentUser, classGuid, false);
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= 21) {
|
||||
createChatAttachView();
|
||||
|
||||
@@ -67,7 +67,7 @@ public class GroupInviteActivity extends BaseFragment implements NotificationCen
|
||||
super.onFragmentCreate();
|
||||
|
||||
NotificationCenter.getInstance().addObserver(this, NotificationCenter.chatInfoDidLoaded);
|
||||
MessagesController.getInstance().loadFullChat(chat_id, classGuid, true);
|
||||
//MessagesController.getInstance().loadFullChat(chat_id, classGuid, true);
|
||||
loading = true;
|
||||
|
||||
rowCount = 0;
|
||||
|
||||
@@ -242,7 +242,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
BotQuery.loadBotInfo(user.id, true, classGuid);
|
||||
}
|
||||
*/
|
||||
MessagesController.getInstance().loadFullUser(MessagesController.getInstance().getUser(user_id), classGuid, true);
|
||||
//MessagesController.getInstance().loadFullUser(MessagesController.getInstance().getUser(user_id), classGuid, true);
|
||||
participantsMap = null;
|
||||
} else if (chat_id != 0) {
|
||||
currentChat = MessagesController.getInstance().getChat(chat_id);
|
||||
@@ -290,9 +290,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
};
|
||||
avatarUpdater.parentFragment = this;
|
||||
|
||||
if (ChatObject.isChannel(currentChat)) {
|
||||
/*if (ChatObject.isChannel(currentChat)) {
|
||||
MessagesController.getInstance().loadFullChat(chat_id, classGuid, true);
|
||||
}
|
||||
}*/
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@@ -329,7 +329,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.blockedUsersDidLoaded);
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.botInfoDidLoaded);
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.userInfoDidLoaded);
|
||||
MessagesController.getInstance().cancelLoadFullUser(user_id);
|
||||
//MessagesController.getInstance().cancelLoadFullUser(user_id);
|
||||
if (currentEncryptedChat != null) {
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.didReceivedNewMessages);
|
||||
}
|
||||
@@ -738,6 +738,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
@Override
|
||||
public void onClick(DialogInterface dialogInterface, int i) {
|
||||
if (i == 0) {
|
||||
/*
|
||||
TLRPC.TL_chatChannelParticipant channelParticipant = ((TLRPC.TL_chatChannelParticipant) user);
|
||||
|
||||
channelParticipant.channelParticipant = new TLRPC.TL_channelParticipantEditor();
|
||||
@@ -764,12 +765,13 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
AndroidUtilities.runOnUIThread(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
// AlertsCreator.showAddUserAlert(error.text, ProfileActivity.this, false); -- EDIT BY MR
|
||||
AlertsCreator.showAddUserAlert(error.text, ProfileActivity.this, false); -- EDIT BY MR
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
*/
|
||||
} else if (i == 1) {
|
||||
kickUser(selectedUser);
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
contactsReimportRow = -1; // EDIT BY MR -rowCount++;
|
||||
contactsSortRow = -1; // EDIT BY MR -- rowCount++;
|
||||
|
||||
MessagesController.getInstance().loadFullUser(UserConfig.getCurrentUser(), classGuid, true);
|
||||
//MessagesController.getInstance().loadFullUser(UserConfig.getCurrentUser(), classGuid, true);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -281,7 +281,7 @@ public class SettingsActivity extends BaseFragment implements NotificationCenter
|
||||
avatarImage.setImageDrawable(null);
|
||||
}
|
||||
*/
|
||||
MessagesController.getInstance().cancelLoadFullUser(UserConfig.getClientUserId());
|
||||
//MessagesController.getInstance().cancelLoadFullUser(UserConfig.getClientUserId());
|
||||
NotificationCenter.getInstance().removeObserver(this, NotificationCenter.updateInterfaces);
|
||||
/* EDIT BY MR
|
||||
avatarUpdater.clear();
|
||||
|
||||
Reference in New Issue
Block a user