mirror of
https://github.com/wrwrabbit/Partisan-Telegram-Android.git
synced 2026-04-30 21:19:33 +00:00
Update to 7.7.0 (2284)
This commit is contained in:
parent
7ba9838a2d
commit
8bf056e27b
209 changed files with 7639 additions and 2243 deletions
|
|
@ -100,7 +100,7 @@ public class ChatObject {
|
|||
loadMembers(true);
|
||||
}
|
||||
|
||||
public void addSelfDummyParticipant() {
|
||||
public void addSelfDummyParticipant(boolean notify) {
|
||||
int selfId = getSelfId();
|
||||
if (participants.indexOfKey(selfId) >= 0) {
|
||||
return;
|
||||
|
|
@ -109,16 +109,29 @@ public class ChatObject {
|
|||
selfDummyParticipant.peer = selfPeer;
|
||||
selfDummyParticipant.muted = true;
|
||||
selfDummyParticipant.self = true;
|
||||
selfDummyParticipant.can_self_unmute = !call.join_muted;
|
||||
selfDummyParticipant.date = currentAccount.getConnectionsManager().getCurrentTime();
|
||||
TLRPC.Chat chat = currentAccount.getMessagesController().getChat(chatId);
|
||||
selfDummyParticipant.can_self_unmute = !call.join_muted || ChatObject.canManageCalls(chat);
|
||||
selfDummyParticipant.date = currentAccount.getConnectionsManager().getCurrentTime();
|
||||
if (ChatObject.canManageCalls(chat) || !ChatObject.isChannel(chat) || chat.megagroup || selfDummyParticipant.can_self_unmute) {
|
||||
selfDummyParticipant.active_date = currentAccount.getConnectionsManager().getCurrentTime();
|
||||
}
|
||||
if (selfId > 0) {
|
||||
TLRPC.UserFull userFull = MessagesController.getInstance(currentAccount.getCurrentAccount()).getUserFull(selfId);
|
||||
if (userFull != null) {
|
||||
selfDummyParticipant.about = userFull.about;
|
||||
}
|
||||
} else {
|
||||
TLRPC.ChatFull chatFull = MessagesController.getInstance(currentAccount.getCurrentAccount()).getChatFull(-selfId);
|
||||
if (chatFull != null) {
|
||||
selfDummyParticipant.about = chatFull.about;
|
||||
}
|
||||
}
|
||||
participants.put(selfId, selfDummyParticipant);
|
||||
sortedParticipants.add(selfDummyParticipant);
|
||||
sortParticipants();
|
||||
currentAccount.getNotificationCenter().postNotificationName(NotificationCenter.groupCallUpdated, chatId, call.id, false);
|
||||
if (notify) {
|
||||
currentAccount.getNotificationCenter().postNotificationName(NotificationCenter.groupCallUpdated, chatId, call.id, false);
|
||||
}
|
||||
}
|
||||
|
||||
public void migrateToChat(TLRPC.Chat chat) {
|
||||
|
|
@ -129,6 +142,14 @@ public class ChatObject {
|
|||
}
|
||||
}
|
||||
|
||||
public boolean shouldShowPanel() {
|
||||
return call.participants_count > 0 || isScheduled();
|
||||
}
|
||||
|
||||
public boolean isScheduled() {
|
||||
return (call.flags & 128) != 0;
|
||||
}
|
||||
|
||||
private int getSelfId() {
|
||||
int selfId;
|
||||
if (selfPeer != null) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue