mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Remove dead code.
This commit is contained in:
@@ -82,10 +82,6 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
private HashMap<Integer, Boolean> gettingUnknownChannels = new HashMap<>();
|
||||
private HashMap<Integer, Boolean> checkingLastMessagesDialogs = new HashMap<>();
|
||||
|
||||
private ArrayList<TLRPC.Updates> updatesQueueSeq = new ArrayList<>();
|
||||
private ArrayList<TLRPC.Updates> updatesQueuePts = new ArrayList<>();
|
||||
private ArrayList<TLRPC.Updates> updatesQueueQts = new ArrayList<>();
|
||||
private HashMap<Integer, String> fullUsersAbout = new HashMap<>();
|
||||
private ArrayList<Integer> loadingFullUsers = new ArrayList<>();
|
||||
private ArrayList<Integer> loadedFullUsers = new ArrayList<>();
|
||||
private ArrayList<Integer> loadingFullChats = new ArrayList<>();
|
||||
@@ -361,9 +357,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
dialogs_read_inbox_max.clear();
|
||||
dialogs_read_outbox_max.clear();
|
||||
exportedChats.clear();
|
||||
fullUsersAbout.clear();
|
||||
dialogs.clear();
|
||||
//joiningToChannels.clear();
|
||||
channelViewsToSend.clear();
|
||||
channelViewsToReload.clear();
|
||||
dialogsServerOnly.clear();
|
||||
@@ -384,9 +378,6 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
Utilities.stageQueue.postRunnable(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
updatesQueueSeq.clear();
|
||||
updatesQueuePts.clear();
|
||||
updatesQueueQts.clear();
|
||||
gettingUnknownChannels.clear();
|
||||
createdDialogIds.clear();
|
||||
gettingDifference = false;
|
||||
@@ -634,19 +625,15 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
}
|
||||
}
|
||||
|
||||
public String getUserAbout(int uid) {
|
||||
return fullUsersAbout.get(uid);
|
||||
}
|
||||
|
||||
|
||||
protected void clearFullUsers() {
|
||||
loadedFullUsers.clear();
|
||||
loadedFullChats.clear();
|
||||
}
|
||||
|
||||
/*
|
||||
public void loadDialogPhotos(final int did, final int offset, final int count, final long max_id, final boolean fromCache, final int classGuid) {
|
||||
if (fromCache) {
|
||||
//MessagesStorage.getInstance().getDialogPhotos(did, offset, count, max_id, classGuid);
|
||||
MessagesStorage.getInstance().getDialogPhotos(did, offset, count, max_id, classGuid);
|
||||
} else {
|
||||
if (did > 0) {
|
||||
TLRPC.User user = getUser(did);
|
||||
@@ -658,7 +645,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
req.offset = offset;
|
||||
req.max_id = (int) max_id;
|
||||
req.user_id = getInputUser(user);
|
||||
int reqId = 0; /*ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
|
||||
int reqId = ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
|
||||
@Override
|
||||
public void run(TLObject response, TLRPC.TL_error error) {
|
||||
if (error == null) {
|
||||
@@ -667,7 +654,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
}
|
||||
}
|
||||
});
|
||||
ConnectionsManager.getInstance().bindRequestToGuid(reqId, classGuid);*/
|
||||
ConnectionsManager.getInstance().bindRequestToGuid(reqId, classGuid);
|
||||
} else if (did < 0) {
|
||||
TLRPC.TL_messages_search req = new TLRPC.TL_messages_search();
|
||||
req.filter = new TLRPC.TL_inputMessagesFilterChatPhotos();
|
||||
@@ -676,7 +663,7 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
req.max_id = (int) max_id;
|
||||
req.q = "";
|
||||
req.peer = MessagesController.getInputPeer(did);
|
||||
int reqId = 0;/*ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
|
||||
int reqId = ConnectionsManager.getInstance().sendRequest(req, new RequestDelegate() {
|
||||
@Override
|
||||
public void run(TLObject response, TLRPC.TL_error error) {
|
||||
if (error == null) {
|
||||
@@ -695,10 +682,11 @@ public class MessagesController implements NotificationCenter.NotificationCenter
|
||||
}
|
||||
}
|
||||
});
|
||||
ConnectionsManager.getInstance().bindRequestToGuid(reqId, classGuid);*/
|
||||
ConnectionsManager.getInstance().bindRequestToGuid(reqId, classGuid);
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
public void blockUser(int user_id) {
|
||||
final TLRPC.User user = getUser(user_id);
|
||||
|
||||
@@ -729,9 +729,6 @@ public class TLRPC {
|
||||
public static class TL_inputMessagesFilterMusic extends MessagesFilter {
|
||||
}
|
||||
|
||||
public static class TL_inputMessagesFilterChatPhotos extends MessagesFilter {
|
||||
}
|
||||
|
||||
public static class TL_inputMessagesFilterUrl extends MessagesFilter {
|
||||
}
|
||||
|
||||
@@ -943,13 +940,6 @@ public class TLRPC {
|
||||
public InputPhotoCrop crop;
|
||||
}
|
||||
|
||||
public static class TL_photos_getUserPhotos extends TLObject {
|
||||
public InputUser user_id;
|
||||
public int offset;
|
||||
public long max_id;
|
||||
public int limit;
|
||||
}
|
||||
|
||||
public static class TL_contacts_resolveUsername extends TLObject {
|
||||
public String username;
|
||||
}
|
||||
|
||||
@@ -740,7 +740,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
int guid = (Integer) args[4];
|
||||
int did = (Integer) args[0];
|
||||
if (avatarsDialogId == did && classGuid == guid) {
|
||||
boolean fromCache = (Boolean) args[3];
|
||||
//boolean fromCache = (Boolean) args[3];
|
||||
|
||||
int setToImage = -1;
|
||||
ArrayList<TLRPC.Photo> photos = (ArrayList<TLRPC.Photo>) args[5];
|
||||
@@ -788,9 +788,9 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
imagesArrLocationsSizes.add(0, 0);
|
||||
setImageIndex(0, true);
|
||||
}
|
||||
if (fromCache) {
|
||||
MessagesController.getInstance().loadDialogPhotos(avatarsDialogId, 0, 80, 0, false, classGuid);
|
||||
}
|
||||
//if (fromCache) {
|
||||
// MessagesController.getInstance().loadDialogPhotos(avatarsDialogId, 0, 80, 0, false, classGuid);
|
||||
//}
|
||||
}
|
||||
} else if (id == NotificationCenter.mediaCountDidLoaded) {
|
||||
long uid = (Long) args[0];
|
||||
@@ -2653,7 +2653,7 @@ public class PhotoViewer implements NotificationCenter.NotificationCenterDelegat
|
||||
SharedMediaQuery.getMediaCount(mergeDialogId, SharedMediaQuery.MEDIA_PHOTOVIDEO, classGuid, true);
|
||||
}
|
||||
} else if (avatarsDialogId != 0) {
|
||||
MessagesController.getInstance().loadDialogPhotos(avatarsDialogId, 0, 80, 0, true, classGuid);
|
||||
//MessagesController.getInstance().loadDialogPhotos(avatarsDialogId, 0, 80, 0, true, classGuid);
|
||||
}
|
||||
}
|
||||
if (currentMessageObject != null && currentMessageObject.isVideo()) {
|
||||
|
||||
@@ -146,6 +146,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
private final static int convert_to_supergroup = 13;
|
||||
private final static int add_shortcut = 14;
|
||||
|
||||
private final static int typeAbout = 8;
|
||||
|
||||
private int emptyRow;
|
||||
private int emptyRowChat;
|
||||
private int emptyRowChat2;
|
||||
@@ -1916,11 +1918,11 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
if (user != null && user.username != null && user.username.length() > 0) {
|
||||
usernameRow = rowCount++;
|
||||
}
|
||||
String about = MessagesController.getInstance().getUserAbout(user.id);
|
||||
/*String about = MessagesController.getInstance().getUserAbout(user.id);
|
||||
if (about != null) {
|
||||
userSectionRow = rowCount++;
|
||||
userInfoRow = rowCount++;
|
||||
} else {
|
||||
} else*/ {
|
||||
userSectionRow = -1;
|
||||
userInfoRow = -1;
|
||||
}
|
||||
@@ -2514,18 +2516,10 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
userCell.setData(MessagesController.getInstance().getUser(part.user_id), null, null, i == emptyRowChat2 + 1 ? R.drawable.menu_newgroup : 0);
|
||||
}
|
||||
break;
|
||||
case 8:
|
||||
case typeAbout:
|
||||
AboutLinkCell aboutLinkCell = (AboutLinkCell) holder.itemView;
|
||||
if (i == userInfoRow) {
|
||||
String about = MessagesController.getInstance().getUserAbout(user_id);
|
||||
aboutLinkCell.setTextAndIcon(about, R.drawable.bot_info);
|
||||
} else if (i == channelInfoRow) {
|
||||
String text = info.about;
|
||||
while (text.contains("\n\n\n")) {
|
||||
text = text.replace("\n\n\n", "\n\n");
|
||||
}
|
||||
aboutLinkCell.setTextAndIcon(text, R.drawable.bot_info);
|
||||
}
|
||||
String about = "ErrAbout";
|
||||
aboutLinkCell.setTextAndIcon(about, R.drawable.bot_info);
|
||||
break;
|
||||
default:
|
||||
checkBackground = false;
|
||||
@@ -2576,7 +2570,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
} else if (i == loadMoreMembersRow) {
|
||||
return 7;
|
||||
} else if (i == userInfoRow || i == channelInfoRow) {
|
||||
return 8;
|
||||
return typeAbout;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user