Search in sources :

Example 1 with ChatActionCell

use of org.telegram.ui.Cells.ChatActionCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class ChannelAdminLogActivity method createMenu.

private void createMenu(View v) {
    MessageObject message = null;
    if (v instanceof ChatMessageCell) {
        message = ((ChatMessageCell) v).getMessageObject();
    } else if (v instanceof ChatActionCell) {
        message = ((ChatActionCell) v).getMessageObject();
    }
    if (message == null) {
        return;
    }
    final int type = getMessageType(message);
    selectedObject = message;
    if (getParentActivity() == null) {
        return;
    }
    AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
    ArrayList<CharSequence> items = new ArrayList<>();
    final ArrayList<Integer> options = new ArrayList<>();
    if (selectedObject.type == 0 || selectedObject.caption != null) {
        items.add(LocaleController.getString("Copy", R.string.Copy));
        options.add(3);
    }
    if (type == 1) {
        if (selectedObject.currentEvent != null && selectedObject.currentEvent.action instanceof TLRPC.TL_channelAdminLogEventActionChangeStickerSet) {
            TLRPC.TL_channelAdminLogEventActionChangeStickerSet action = (TLRPC.TL_channelAdminLogEventActionChangeStickerSet) selectedObject.currentEvent.action;
            TLRPC.InputStickerSet stickerSet = action.new_stickerset;
            if (stickerSet == null || stickerSet instanceof TLRPC.TL_inputStickerSetEmpty) {
                stickerSet = action.prev_stickerset;
            }
            if (stickerSet != null) {
                showDialog(new StickersAlert(getParentActivity(), ChannelAdminLogActivity.this, stickerSet, null, null));
                return;
            }
        } else if (selectedObject.currentEvent != null && selectedObject.currentEvent.action instanceof TLRPC.TL_channelAdminLogEventActionChangeHistoryTTL) {
            if (ChatObject.canUserDoAdminAction(currentChat, ChatObject.ACTION_DELETE_MESSAGES)) {
                ClearHistoryAlert alert = new ClearHistoryAlert(getParentActivity(), null, currentChat, false, null);
                alert.setDelegate(new ClearHistoryAlert.ClearHistoryAlertDelegate() {

                    @Override
                    public void onAutoDeleteHistory(int ttl, int action) {
                        getMessagesController().setDialogHistoryTTL(-currentChat.id, ttl);
                        TLRPC.ChatFull chatInfo = getMessagesController().getChatFull(currentChat.id);
                        if (chatInfo != null) {
                            undoView.showWithAction(-currentChat.id, action, null, chatInfo.ttl_period, null, null);
                        }
                    }
                });
                showDialog(alert);
            }
        }
    } else if (type == 3) {
        if (selectedObject.messageOwner.media instanceof TLRPC.TL_messageMediaWebPage && MessageObject.isNewGifDocument(selectedObject.messageOwner.media.webpage.document)) {
            items.add(LocaleController.getString("SaveToGIFs", R.string.SaveToGIFs));
            options.add(11);
        }
    } else if (type == 4) {
        if (selectedObject.isVideo()) {
            items.add(LocaleController.getString("SaveToGallery", R.string.SaveToGallery));
            options.add(4);
            items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
            options.add(6);
        } else if (selectedObject.isMusic()) {
            items.add(LocaleController.getString("SaveToMusic", R.string.SaveToMusic));
            options.add(10);
            items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
            options.add(6);
        } else if (selectedObject.getDocument() != null) {
            if (MessageObject.isNewGifDocument(selectedObject.getDocument())) {
                items.add(LocaleController.getString("SaveToGIFs", R.string.SaveToGIFs));
                options.add(11);
            }
            items.add(LocaleController.getString("SaveToDownloads", R.string.SaveToDownloads));
            options.add(10);
            items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
            options.add(6);
        } else {
            items.add(LocaleController.getString("SaveToGallery", R.string.SaveToGallery));
            options.add(4);
        }
    } else if (type == 5) {
        items.add(LocaleController.getString("ApplyLocalizationFile", R.string.ApplyLocalizationFile));
        options.add(5);
        items.add(LocaleController.getString("SaveToDownloads", R.string.SaveToDownloads));
        options.add(10);
        items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
        options.add(6);
    } else if (type == 10) {
        items.add(LocaleController.getString("ApplyThemeFile", R.string.ApplyThemeFile));
        options.add(5);
        items.add(LocaleController.getString("SaveToDownloads", R.string.SaveToDownloads));
        options.add(10);
        items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
        options.add(6);
    } else if (type == 6) {
        items.add(LocaleController.getString("SaveToGallery", R.string.SaveToGallery));
        options.add(7);
        items.add(LocaleController.getString("SaveToDownloads", R.string.SaveToDownloads));
        options.add(10);
        items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
        options.add(6);
    } else if (type == 7) {
        if (selectedObject.isMask()) {
            items.add(LocaleController.getString("AddToMasks", R.string.AddToMasks));
        } else {
            items.add(LocaleController.getString("AddToStickers", R.string.AddToStickers));
        }
        options.add(9);
    } else if (type == 8) {
        long uid = selectedObject.messageOwner.media.user_id;
        TLRPC.User user = null;
        if (uid != 0) {
            user = MessagesController.getInstance(currentAccount).getUser(uid);
        }
        if (user != null && user.id != UserConfig.getInstance(currentAccount).getClientUserId() && ContactsController.getInstance(currentAccount).contactsDict.get(user.id) == null) {
            items.add(LocaleController.getString("AddContactTitle", R.string.AddContactTitle));
            options.add(15);
        }
        if (!TextUtils.isEmpty(selectedObject.messageOwner.media.phone_number)) {
            items.add(LocaleController.getString("Copy", R.string.Copy));
            options.add(16);
            items.add(LocaleController.getString("Call", R.string.Call));
            options.add(17);
        }
    }
    if (options.isEmpty()) {
        return;
    }
    final CharSequence[] finalItems = items.toArray(new CharSequence[0]);
    builder.setItems(finalItems, (dialogInterface, i) -> {
        if (selectedObject == null || i < 0 || i >= options.size()) {
            return;
        }
        processSelectedOption(options.get(i));
    });
    builder.setTitle(LocaleController.getString("Message", R.string.Message));
    showDialog(builder.create());
}
Also used : AlertDialog(org.telegram.ui.ActionBar.AlertDialog) ArrayList(java.util.ArrayList) TLRPC(org.telegram.tgnet.TLRPC) ClearHistoryAlert(org.telegram.ui.Components.ClearHistoryAlert) Paint(android.graphics.Paint) StickersAlert(org.telegram.ui.Components.StickersAlert) ChatActionCell(org.telegram.ui.Cells.ChatActionCell) ChatMessageCell(org.telegram.ui.Cells.ChatMessageCell) MessageObject(org.telegram.messenger.MessageObject)

Example 2 with ChatActionCell

use of org.telegram.ui.Cells.ChatActionCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class ChatActivity method createMenu.

private void createMenu(View v, boolean single, boolean listView, float x, float y, boolean searchGroup) {
    if (actionBar.isActionModeShowed() || reportType >= 0) {
        return;
    }
    MessageObject message;
    MessageObject primaryMessage;
    if (v instanceof ChatMessageCell) {
        message = ((ChatMessageCell) v).getMessageObject();
        primaryMessage = ((ChatMessageCell) v).getPrimaryMessageObject();
    } else if (v instanceof ChatActionCell) {
        message = ((ChatActionCell) v).getMessageObject();
        primaryMessage = message;
    } else {
        primaryMessage = null;
        message = null;
    }
    if (message == null) {
        return;
    }
    final int type = getMessageType(message);
    if (single) {
        if (message.messageOwner.action instanceof TLRPC.TL_messageActionPinMessage) {
            if (message.getReplyMsgId() != 0) {
                scrollToMessageId(message.getReplyMsgId(), message.messageOwner.id, true, message.getDialogId() == mergeDialogId ? 1 : 0, false, 0);
            } else {
                Toast.makeText(getParentActivity(), LocaleController.getString("MessageNotFound", R.string.MessageNotFound), Toast.LENGTH_SHORT).show();
            }
            return;
        } else if (message.messageOwner.action instanceof TLRPC.TL_messageActionSetMessagesTTL) {
            if (avatarContainer.openSetTimer()) {
                return;
            }
        } else if (message.messageOwner.action instanceof TLRPC.TL_messageActionPaymentSent && message.replyMessageObject != null && message.replyMessageObject.isInvoice()) {
            TLRPC.TL_payments_getPaymentReceipt req = new TLRPC.TL_payments_getPaymentReceipt();
            req.msg_id = message.getId();
            req.peer = getMessagesController().getInputPeer(message.messageOwner.peer_id);
            getConnectionsManager().sendRequest(req, (response, error) -> AndroidUtilities.runOnUIThread(() -> {
                if (response instanceof TLRPC.TL_payments_paymentReceipt) {
                    presentFragment(new PaymentFormActivity((TLRPC.TL_payments_paymentReceipt) response));
                }
            }), ConnectionsManager.RequestFlagFailOnServerErrors);
            return;
        } else if (message.messageOwner.action instanceof TLRPC.TL_messageActionGroupCall || message.messageOwner.action instanceof TLRPC.TL_messageActionInviteToGroupCall || message.messageOwner.action instanceof TLRPC.TL_messageActionGroupCallScheduled) {
            if (getParentActivity() == null) {
                return;
            }
            VoIPService sharedInstance = VoIPService.getSharedInstance();
            if (sharedInstance != null) {
                if (sharedInstance.groupCall != null && message.messageOwner.action.call.id == sharedInstance.groupCall.call.id) {
                    if (getParentActivity() instanceof LaunchActivity) {
                        GroupCallActivity.create((LaunchActivity) getParentActivity(), AccountInstance.getInstance(currentAccount), null, null, false, null);
                    } else {
                        Intent intent = new Intent(getParentActivity(), LaunchActivity.class).setAction("voip_chat");
                        intent.putExtra("currentAccount", VoIPService.getSharedInstance().getAccount());
                        getParentActivity().startActivity(intent);
                    }
                } else {
                    createGroupCall = getGroupCall() == null;
                    VoIPHelper.startCall(currentChat, null, null, createGroupCall, getParentActivity(), ChatActivity.this, getAccountInstance());
                }
                return;
            } else if (fragmentContextView != null && getGroupCall() != null) {
                if (VoIPService.getSharedInstance() != null) {
                    GroupCallActivity.create((LaunchActivity) getParentActivity(), AccountInstance.getInstance(VoIPService.getSharedInstance().getAccount()), null, null, false, null);
                } else {
                    ChatObject.Call call = getGroupCall();
                    if (call == null) {
                        return;
                    }
                    VoIPHelper.startCall(getMessagesController().getChat(call.chatId), null, null, false, getParentActivity(), ChatActivity.this, getAccountInstance());
                }
                return;
            } else if (ChatObject.canManageCalls(currentChat)) {
                VoIPHelper.showGroupCallAlert(ChatActivity.this, currentChat, null, true, getAccountInstance());
                return;
            }
        } else if (message.messageOwner.action instanceof TLRPC.TL_messageActionSetChatTheme) {
            showChatThemeBottomSheet();
            return;
        }
    }
    if (message.isSponsored() || threadMessageObjects != null && threadMessageObjects.contains(message)) {
        single = true;
    }
    selectedObject = null;
    selectedObjectGroup = null;
    forwardingMessage = null;
    forwardingMessageGroup = null;
    selectedObjectToEditCaption = null;
    for (int a = 1; a >= 0; a--) {
        selectedMessagesCanCopyIds[a].clear();
        selectedMessagesCanStarIds[a].clear();
        selectedMessagesIds[a].clear();
    }
    hideActionMode();
    updatePinnedMessageView(true);
    MessageObject.GroupedMessages groupedMessages;
    if (searchGroup) {
        groupedMessages = getValidGroupedMessage(message);
    } else {
        groupedMessages = null;
    }
    boolean allowChatActions = true;
    boolean allowPin;
    if (chatMode == MODE_SCHEDULED || isThreadChat()) {
        allowPin = false;
    } else if (currentChat != null) {
        allowPin = message.getDialogId() != mergeDialogId && ChatObject.canPinMessages(currentChat);
    } else if (currentEncryptedChat == null) {
        if (UserObject.isDeleted(currentUser)) {
            allowPin = false;
        } else if (userInfo != null) {
            allowPin = userInfo.can_pin_message;
        } else {
            allowPin = false;
        }
    } else {
        allowPin = false;
    }
    allowPin = allowPin && message.getId() > 0 && (message.messageOwner.action == null || message.messageOwner.action instanceof TLRPC.TL_messageActionEmpty);
    boolean noforwards = getMessagesController().isChatNoForwards(currentChat) || message.messageOwner.noforwards;
    boolean allowUnpin = message.getDialogId() != mergeDialogId && allowPin && (pinnedMessageObjects.containsKey(message.getId()) || groupedMessages != null && !groupedMessages.messages.isEmpty() && pinnedMessageObjects.containsKey(groupedMessages.messages.get(0).getId()));
    boolean allowEdit = message.canEditMessage(currentChat) && !chatActivityEnterView.hasAudioToSend() && message.getDialogId() != mergeDialogId;
    if (allowEdit && groupedMessages != null) {
        int captionsCount = 0;
        for (int a = 0, N = groupedMessages.messages.size(); a < N; a++) {
            MessageObject messageObject = groupedMessages.messages.get(a);
            if (a == 0 || !TextUtils.isEmpty(messageObject.caption)) {
                selectedObjectToEditCaption = messageObject;
                if (!TextUtils.isEmpty(messageObject.caption)) {
                    captionsCount++;
                }
            }
        }
        allowEdit = captionsCount < 2;
    }
    if (chatMode == MODE_SCHEDULED || threadMessageObjects != null && threadMessageObjects.contains(message) || message.isSponsored() || type == 1 && message.getDialogId() == mergeDialogId || message.messageOwner.action instanceof TLRPC.TL_messageActionSecureValuesSent || currentEncryptedChat == null && message.getId() < 0 || bottomOverlayChat != null && bottomOverlayChat.getVisibility() == View.VISIBLE || currentChat != null && (ChatObject.isNotInChat(currentChat) && !isThreadChat() || ChatObject.isChannel(currentChat) && !ChatObject.canPost(currentChat) && !currentChat.megagroup || !ChatObject.canSendMessages(currentChat))) {
        allowChatActions = false;
    }
    if (single || type < 2 || type == 20) {
        if (getParentActivity() == null) {
            return;
        }
        ArrayList<Integer> icons = new ArrayList<>();
        ArrayList<CharSequence> items = new ArrayList<>();
        final ArrayList<Integer> options = new ArrayList<>();
        CharSequence messageText = null;
        if (type >= 0 || type == -1 && single && (message.isSending() || message.isEditing()) && currentEncryptedChat == null) {
            selectedObject = message;
            selectedObjectGroup = groupedMessages;
            // used only in translations
            messageText = getMessageCaption(selectedObject, selectedObjectGroup);
            if (messageText == null && selectedObject.isPoll()) {
                try {
                    TLRPC.Poll poll = ((TLRPC.TL_messageMediaPoll) selectedObject.messageOwner.media).poll;
                    StringBuilder pollText = new StringBuilder();
                    pollText = new StringBuilder(poll.question).append("\n");
                    for (TLRPC.TL_pollAnswer answer : poll.answers) pollText.append("\n\uD83D\uDD18 ").append(answer.text);
                    messageText = pollText.toString();
                } catch (Exception e) {
                }
            }
            if (messageText == null)
                messageText = getMessageContent(selectedObject, 0, false);
            if (messageText != null) {
                if (isEmoji(messageText.toString()))
                    // message fully consists of emojis, do not translate
                    messageText = null;
            }
            if (type == -1) {
                if ((selectedObject.type == 0 || selectedObject.isAnimatedEmoji() || getMessageCaption(selectedObject, selectedObjectGroup) != null) && !noforwards) {
                    items.add(LocaleController.getString("Copy", R.string.Copy));
                    options.add(OPTION_COPY);
                    icons.add(R.drawable.msg_copy);
                }
                items.add(LocaleController.getString("CancelSending", R.string.CancelSending));
                options.add(OPTION_CANCEL_SENDING);
                icons.add(R.drawable.msg_delete);
            } else if (type == 0) {
                items.add(LocaleController.getString("Retry", R.string.Retry));
                options.add(OPTION_RETRY);
                icons.add(R.drawable.msg_retry);
                items.add(LocaleController.getString("Delete", R.string.Delete));
                options.add(OPTION_DELETE);
                icons.add(selectedObject.messageOwner.ttl_period != 0 ? R.drawable.msg_delete_auto : R.drawable.msg_delete);
            } else if (type == 1) {
                if (currentChat != null) {
                    if (allowChatActions) {
                        items.add(LocaleController.getString("Reply", R.string.Reply));
                        options.add(OPTION_REPLY);
                        icons.add(R.drawable.msg_reply);
                    }
                    if (!isThreadChat() && chatMode != MODE_SCHEDULED && message.hasReplies() && currentChat.megagroup && message.canViewThread()) {
                        items.add(LocaleController.formatPluralString("ViewReplies", message.getRepliesCount()));
                        options.add(OPTION_VIEW_REPLIES_OR_THREAD);
                        icons.add(R.drawable.msg_viewreplies);
                    }
                    if (allowUnpin) {
                        items.add(LocaleController.getString("UnpinMessage", R.string.UnpinMessage));
                        options.add(OPTION_UNPIN);
                        icons.add(R.drawable.msg_unpin);
                    } else if (allowPin) {
                        items.add(LocaleController.getString("PinMessage", R.string.PinMessage));
                        options.add(OPTION_PIN);
                        icons.add(R.drawable.msg_pin);
                    }
                    if (selectedObject != null && selectedObject.contentType == 0 && (messageText != null && messageText.length() > 0 && !selectedObject.isAnimatedEmoji() && !selectedObject.isDice()) && MessagesController.getGlobalMainSettings().getBoolean("translate_button", false)) {
                        items.add(LocaleController.getString("TranslateMessage", R.string.TranslateMessage));
                        options.add(29);
                        icons.add(R.drawable.msg_translate);
                    }
                    if (message.canEditMessage(currentChat)) {
                        items.add(LocaleController.getString("Edit", R.string.Edit));
                        options.add(OPTION_EDIT);
                        icons.add(R.drawable.msg_edit);
                    }
                    if (selectedObject.contentType == 0 && !selectedObject.isMediaEmptyWebpage() && selectedObject.getId() > 0 && !selectedObject.isOut() && (currentChat != null || currentUser != null && currentUser.bot)) {
                        items.add(LocaleController.getString("ReportChat", R.string.ReportChat));
                        options.add(OPTION_REPORT_CHAT);
                        icons.add(R.drawable.msg_report);
                    }
                } else {
                    if (selectedObject.getId() > 0 && allowChatActions) {
                        items.add(LocaleController.getString("Reply", R.string.Reply));
                        options.add(OPTION_REPLY);
                        icons.add(R.drawable.msg_reply);
                    }
                }
                if (message.canDeleteMessage(chatMode == MODE_SCHEDULED, currentChat) && (threadMessageObjects == null || !threadMessageObjects.contains(message))) {
                    items.add(LocaleController.getString("Delete", R.string.Delete));
                    options.add(OPTION_DELETE);
                    icons.add(selectedObject.messageOwner.ttl_period != 0 ? R.drawable.msg_delete_auto : R.drawable.msg_delete);
                }
            } else if (type == 20) {
                items.add(LocaleController.getString("Retry", R.string.Retry));
                options.add(OPTION_RETRY);
                icons.add(R.drawable.msg_retry);
                if (!noforwards) {
                    items.add(LocaleController.getString("Copy", R.string.Copy));
                    options.add(OPTION_COPY);
                    icons.add(R.drawable.msg_copy);
                }
                items.add(LocaleController.getString("Delete", R.string.Delete));
                options.add(OPTION_DELETE);
                icons.add(selectedObject.messageOwner.ttl_period != 0 ? R.drawable.msg_delete_auto : R.drawable.msg_delete);
            } else {
                if (currentEncryptedChat == null) {
                    if (chatMode == MODE_SCHEDULED) {
                        items.add(LocaleController.getString("MessageScheduleSend", R.string.MessageScheduleSend));
                        options.add(OPTION_SEND_NOW);
                        icons.add(R.drawable.outline_send);
                    }
                    if (selectedObject.messageOwner.action instanceof TLRPC.TL_messageActionPhoneCall) {
                        TLRPC.TL_messageActionPhoneCall call = (TLRPC.TL_messageActionPhoneCall) message.messageOwner.action;
                        items.add((call.reason instanceof TLRPC.TL_phoneCallDiscardReasonMissed || call.reason instanceof TLRPC.TL_phoneCallDiscardReasonBusy) && !message.isOutOwner() ? LocaleController.getString("CallBack", R.string.CallBack) : LocaleController.getString("CallAgain", R.string.CallAgain));
                        options.add(OPTION_CALL_AGAIN);
                        icons.add(R.drawable.msg_callback);
                        if (VoIPHelper.canRateCall(call)) {
                            items.add(LocaleController.getString("CallMessageReportProblem", R.string.CallMessageReportProblem));
                            options.add(OPTION_RATE_CALL);
                            icons.add(R.drawable.msg_fave);
                        }
                    }
                    if (allowChatActions) {
                        items.add(LocaleController.getString("Reply", R.string.Reply));
                        options.add(8);
                        icons.add(R.drawable.msg_reply);
                    }
                    if ((selectedObject.type == 0 || selectedObject.isDice() || selectedObject.isAnimatedEmoji() || getMessageCaption(selectedObject, selectedObjectGroup) != null) && !noforwards) {
                        items.add(LocaleController.getString("Copy", R.string.Copy));
                        options.add(3);
                        icons.add(R.drawable.msg_copy);
                    }
                    if (!isThreadChat() && chatMode != MODE_SCHEDULED && currentChat != null && (currentChat.has_link || message.hasReplies()) && currentChat.megagroup && message.canViewThread()) {
                        if (message.hasReplies()) {
                            items.add(LocaleController.formatPluralString("ViewReplies", message.getRepliesCount()));
                        } else {
                            items.add(LocaleController.getString("ViewThread", R.string.ViewThread));
                        }
                        options.add(27);
                        icons.add(R.drawable.msg_viewreplies);
                    }
                    if (!selectedObject.isSponsored() && chatMode != MODE_SCHEDULED && ChatObject.isChannel(currentChat) && selectedObject.getDialogId() != mergeDialogId) {
                        items.add(LocaleController.getString("CopyLink", R.string.CopyLink));
                        options.add(22);
                        icons.add(R.drawable.msg_link);
                    }
                    if (type == 2) {
                        if (chatMode != MODE_SCHEDULED) {
                            if (selectedObject.type == MessageObject.TYPE_POLL && !message.isPollClosed()) {
                                if (message.canUnvote()) {
                                    items.add(LocaleController.getString("Unvote", R.string.Unvote));
                                    options.add(25);
                                    icons.add(R.drawable.msg_unvote);
                                }
                                if (!message.isForwarded() && (message.isOut() && (!ChatObject.isChannel(currentChat) || currentChat.megagroup) || ChatObject.isChannel(currentChat) && !currentChat.megagroup && (currentChat.creator || currentChat.admin_rights != null && currentChat.admin_rights.edit_messages))) {
                                    if (message.isQuiz()) {
                                        items.add(LocaleController.getString("StopQuiz", R.string.StopQuiz));
                                    } else {
                                        items.add(LocaleController.getString("StopPoll", R.string.StopPoll));
                                    }
                                    options.add(26);
                                    icons.add(R.drawable.msg_pollstop);
                                }
                            } else if (selectedObject.isMusic() && !noforwards) {
                                items.add(LocaleController.getString("SaveToMusic", R.string.SaveToMusic));
                                options.add(OPTION_SAVE_TO_DOWNLOADS_OR_MUSIC);
                                icons.add(R.drawable.msg_download);
                            } else if (selectedObject.isDocument() && !noforwards) {
                                items.add(LocaleController.getString("SaveToDownloads", R.string.SaveToDownloads));
                                options.add(OPTION_SAVE_TO_DOWNLOADS_OR_MUSIC);
                                icons.add(R.drawable.msg_download);
                            }
                        }
                    } else if (type == 3 && !noforwards) {
                        if (selectedObject.messageOwner.media instanceof TLRPC.TL_messageMediaWebPage && MessageObject.isNewGifDocument(selectedObject.messageOwner.media.webpage.document)) {
                            items.add(LocaleController.getString("SaveToGIFs", R.string.SaveToGIFs));
                            options.add(11);
                            icons.add(R.drawable.msg_gif);
                        }
                    } else if (type == 4) {
                        if (!noforwards) {
                            if (selectedObject.isVideo()) {
                                if (!selectedObject.needDrawBluredPreview()) {
                                    items.add(LocaleController.getString("SaveToGallery", R.string.SaveToGallery));
                                    options.add(4);
                                    icons.add(R.drawable.msg_gallery);
                                    items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
                                    options.add(6);
                                    icons.add(R.drawable.msg_shareout);
                                }
                            } else if (selectedObject.isMusic()) {
                                items.add(LocaleController.getString("SaveToMusic", R.string.SaveToMusic));
                                options.add(OPTION_SAVE_TO_DOWNLOADS_OR_MUSIC);
                                icons.add(R.drawable.msg_download);
                                items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
                                options.add(6);
                                icons.add(R.drawable.msg_shareout);
                            } else if (selectedObject.getDocument() != null) {
                                if (MessageObject.isNewGifDocument(selectedObject.getDocument())) {
                                    items.add(LocaleController.getString("SaveToGIFs", R.string.SaveToGIFs));
                                    options.add(11);
                                    icons.add(R.drawable.msg_gif);
                                }
                                items.add(LocaleController.getString("SaveToDownloads", R.string.SaveToDownloads));
                                options.add(OPTION_SAVE_TO_DOWNLOADS_OR_MUSIC);
                                icons.add(R.drawable.msg_download);
                                items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
                                options.add(6);
                                icons.add(R.drawable.msg_shareout);
                            } else {
                                if (!selectedObject.needDrawBluredPreview()) {
                                    items.add(LocaleController.getString("SaveToGallery", R.string.SaveToGallery));
                                    options.add(4);
                                    icons.add(R.drawable.msg_gallery);
                                }
                            }
                        }
                    } else if (type == 5) {
                        items.add(LocaleController.getString("ApplyLocalizationFile", R.string.ApplyLocalizationFile));
                        options.add(5);
                        icons.add(R.drawable.msg_language);
                        if (!noforwards) {
                            items.add(LocaleController.getString("SaveToDownloads", R.string.SaveToDownloads));
                            options.add(OPTION_SAVE_TO_DOWNLOADS_OR_MUSIC);
                            icons.add(R.drawable.msg_download);
                            items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
                            options.add(6);
                            icons.add(R.drawable.msg_shareout);
                        }
                    } else if (type == 10) {
                        items.add(LocaleController.getString("ApplyThemeFile", R.string.ApplyThemeFile));
                        options.add(5);
                        icons.add(R.drawable.msg_theme);
                        if (!noforwards) {
                            items.add(LocaleController.getString("SaveToDownloads", R.string.SaveToDownloads));
                            options.add(OPTION_SAVE_TO_DOWNLOADS_OR_MUSIC);
                            icons.add(R.drawable.msg_download);
                            items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
                            options.add(6);
                            icons.add(R.drawable.msg_shareout);
                        }
                    } else if (type == 6 && !noforwards) {
                        items.add(LocaleController.getString("SaveToGallery", R.string.SaveToGallery));
                        options.add(7);
                        icons.add(R.drawable.msg_gallery);
                        items.add(LocaleController.getString("SaveToDownloads", R.string.SaveToDownloads));
                        options.add(OPTION_SAVE_TO_DOWNLOADS_OR_MUSIC);
                        icons.add(R.drawable.msg_download);
                        items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
                        options.add(6);
                        icons.add(R.drawable.msg_shareout);
                    } else if (type == 7) {
                        if (selectedObject.isMask()) {
                            items.add(LocaleController.getString("AddToMasks", R.string.AddToMasks));
                            options.add(9);
                            icons.add(R.drawable.msg_sticker);
                        } else {
                            items.add(LocaleController.getString("AddToStickers", R.string.AddToStickers));
                            options.add(9);
                            icons.add(R.drawable.msg_sticker);
                            TLRPC.Document document = selectedObject.getDocument();
                            if (!getMediaDataController().isStickerInFavorites(document)) {
                                if (getMediaDataController().canAddStickerToFavorites() && MessageObject.isStickerHasSet(document)) {
                                    items.add(LocaleController.getString("AddToFavorites", R.string.AddToFavorites));
                                    options.add(20);
                                    icons.add(R.drawable.msg_fave);
                                }
                            } else {
                                items.add(LocaleController.getString("DeleteFromFavorites", R.string.DeleteFromFavorites));
                                options.add(21);
                                icons.add(R.drawable.msg_unfave);
                            }
                        }
                    } else if (type == 8) {
                        long uid = selectedObject.messageOwner.media.user_id;
                        TLRPC.User user = null;
                        if (uid != 0) {
                            user = MessagesController.getInstance(currentAccount).getUser(uid);
                        }
                        if (user != null && user.id != getUserConfig().getClientUserId() && getContactsController().contactsDict.get(user.id) == null) {
                            items.add(LocaleController.getString("AddContactTitle", R.string.AddContactTitle));
                            options.add(15);
                            icons.add(R.drawable.msg_addcontact);
                        }
                        if (!TextUtils.isEmpty(selectedObject.messageOwner.media.phone_number)) {
                            if (!noforwards) {
                                items.add(LocaleController.getString("Copy", R.string.Copy));
                                options.add(16);
                                icons.add(R.drawable.msg_copy);
                            }
                            items.add(LocaleController.getString("Call", R.string.Call));
                            options.add(17);
                            icons.add(R.drawable.msg_callback);
                        }
                    } else if (type == 9) {
                        TLRPC.Document document = selectedObject.getDocument();
                        if (!getMediaDataController().isStickerInFavorites(document)) {
                            if (MessageObject.isStickerHasSet(document)) {
                                items.add(LocaleController.getString("AddToFavorites", R.string.AddToFavorites));
                                options.add(20);
                                icons.add(R.drawable.msg_fave);
                            }
                        } else {
                            items.add(LocaleController.getString("DeleteFromFavorites", R.string.DeleteFromFavorites));
                            options.add(21);
                            icons.add(R.drawable.msg_unfave);
                        }
                    }
                    if (!selectedObject.isSponsored() && chatMode != MODE_SCHEDULED && !selectedObject.needDrawBluredPreview() && !selectedObject.isLiveLocation() && selectedObject.type != 16 && !noforwards) {
                        items.add(LocaleController.getString("Forward", R.string.Forward));
                        options.add(2);
                        icons.add(R.drawable.msg_forward);
                    }
                    if (allowUnpin) {
                        items.add(LocaleController.getString("UnpinMessage", R.string.UnpinMessage));
                        options.add(14);
                        icons.add(R.drawable.msg_unpin);
                    } else if (allowPin) {
                        items.add(LocaleController.getString("PinMessage", R.string.PinMessage));
                        options.add(13);
                        icons.add(R.drawable.msg_pin);
                    }
                    if (selectedObject != null && selectedObject.contentType == 0 && (messageText != null && messageText.length() > 0 && !selectedObject.isAnimatedEmoji() && !selectedObject.isDice()) && MessagesController.getGlobalMainSettings().getBoolean("translate_button", false)) {
                        items.add(LocaleController.getString("TranslateMessage", R.string.TranslateMessage));
                        options.add(29);
                        icons.add(R.drawable.msg_translate);
                    }
                    if (allowEdit) {
                        items.add(LocaleController.getString("Edit", R.string.Edit));
                        options.add(12);
                        icons.add(R.drawable.msg_edit);
                    }
                    if (chatMode == MODE_SCHEDULED && selectedObject.canEditMessageScheduleTime(currentChat)) {
                        items.add(LocaleController.getString("MessageScheduleEditTime", R.string.MessageScheduleEditTime));
                        options.add(102);
                        icons.add(R.drawable.msg_schedule);
                    }
                    if (chatMode != MODE_SCHEDULED && selectedObject.contentType == 0 && selectedObject.getId() > 0 && !selectedObject.isOut() && (currentChat != null || currentUser != null && currentUser.bot)) {
                        if (UserObject.isReplyUser(currentUser)) {
                            items.add(LocaleController.getString("BlockContact", R.string.BlockContact));
                            options.add(23);
                            icons.add(R.drawable.msg_block2);
                        } else {
                            items.add(LocaleController.getString("ReportChat", R.string.ReportChat));
                            options.add(23);
                            icons.add(R.drawable.msg_report);
                        }
                    }
                    if (message.canDeleteMessage(chatMode == MODE_SCHEDULED, currentChat) && (threadMessageObjects == null || !threadMessageObjects.contains(message))) {
                        items.add(LocaleController.getString("Delete", R.string.Delete));
                        options.add(1);
                        icons.add(selectedObject.messageOwner.ttl_period != 0 ? R.drawable.msg_delete_auto : R.drawable.msg_delete);
                    }
                } else {
                    if (allowChatActions) {
                        items.add(LocaleController.getString("Reply", R.string.Reply));
                        options.add(8);
                        icons.add(R.drawable.msg_reply);
                    }
                    if ((selectedObject.type == 0 || selectedObject.isAnimatedEmoji() || getMessageCaption(selectedObject, selectedObjectGroup) != null) && !noforwards) {
                        items.add(LocaleController.getString("Copy", R.string.Copy));
                        options.add(3);
                        icons.add(R.drawable.msg_copy);
                    }
                    if (!isThreadChat() && chatMode != MODE_SCHEDULED && currentChat != null && (currentChat.has_link || message.hasReplies()) && currentChat.megagroup && message.canViewThread()) {
                        if (message.hasReplies()) {
                            items.add(LocaleController.formatPluralString("ViewReplies", message.getRepliesCount()));
                        } else {
                            items.add(LocaleController.getString("ViewThread", R.string.ViewThread));
                        }
                        options.add(27);
                        icons.add(R.drawable.msg_viewreplies);
                    }
                    if (type == 4 && !noforwards) {
                        if (selectedObject.isVideo()) {
                            items.add(LocaleController.getString("SaveToGallery", R.string.SaveToGallery));
                            options.add(4);
                            icons.add(R.drawable.msg_gallery);
                            items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
                            options.add(6);
                            icons.add(R.drawable.msg_shareout);
                        } else if (selectedObject.isMusic()) {
                            items.add(LocaleController.getString("SaveToMusic", R.string.SaveToMusic));
                            options.add(OPTION_SAVE_TO_DOWNLOADS_OR_MUSIC);
                            icons.add(R.drawable.msg_download);
                            items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
                            options.add(6);
                            icons.add(R.drawable.msg_shareout);
                        } else if (!selectedObject.isVideo() && selectedObject.getDocument() != null) {
                            items.add(LocaleController.getString("SaveToDownloads", R.string.SaveToDownloads));
                            options.add(OPTION_SAVE_TO_DOWNLOADS_OR_MUSIC);
                            icons.add(R.drawable.msg_download);
                            items.add(LocaleController.getString("ShareFile", R.string.ShareFile));
                            options.add(6);
                            icons.add(R.drawable.msg_shareout);
                        } else {
                            items.add(LocaleController.getString("SaveToGallery", R.string.SaveToGallery));
                            options.add(4);
                            icons.add(R.drawable.msg_gallery);
                        }
                    } else if (type == 5) {
                        items.add(LocaleController.getString("ApplyLocalizationFile", R.string.ApplyLocalizationFile));
                        options.add(5);
                        icons.add(R.drawable.msg_language);
                    } else if (type == 10) {
                        items.add(LocaleController.getString("ApplyThemeFile", R.string.ApplyThemeFile));
                        options.add(5);
                        icons.add(R.drawable.msg_theme);
                    } else if (type == 7) {
                        items.add(LocaleController.getString("AddToStickers", R.string.AddToStickers));
                        options.add(9);
                        icons.add(R.drawable.msg_sticker);
                    } else if (type == 8) {
                        long uid = selectedObject.messageOwner.media.user_id;
                        TLRPC.User user = null;
                        if (uid != 0) {
                            user = MessagesController.getInstance(currentAccount).getUser(uid);
                        }
                        if (user != null && user.id != getUserConfig().getClientUserId() && getContactsController().contactsDict.get(user.id) == null) {
                            items.add(LocaleController.getString("AddContactTitle", R.string.AddContactTitle));
                            options.add(15);
                            icons.add(R.drawable.msg_addcontact);
                        }
                        if (!TextUtils.isEmpty(selectedObject.messageOwner.media.phone_number)) {
                            if (!noforwards) {
                                items.add(LocaleController.getString("Copy", R.string.Copy));
                                options.add(16);
                                icons.add(R.drawable.msg_copy);
                            }
                            items.add(LocaleController.getString("Call", R.string.Call));
                            options.add(17);
                            icons.add(R.drawable.msg_callback);
                        }
                    }
                    items.add(LocaleController.getString("Delete", R.string.Delete));
                    options.add(1);
                    icons.add(selectedObject.messageOwner.ttl_period != 0 ? R.drawable.msg_delete_auto : R.drawable.msg_delete);
                }
            }
        }
        if (options.isEmpty()) {
            return;
        }
        if (scrimPopupWindow != null) {
            closeMenu();
            menuDeleteItem = null;
            scrimPopupWindowItems = null;
            return;
        }
        final AtomicBoolean waitForLangDetection = new AtomicBoolean(false);
        final AtomicReference<Runnable> onLangDetectionDone = new AtomicReference(null);
        Rect rect = new Rect();
        List<TLRPC.TL_availableReaction> availableReacts = getMediaDataController().getEnabledReactionsList();
        boolean isReactionsViewAvailable = !isSecretChat() && !isInScheduleMode() && currentUser == null && message.hasReactions() && (!ChatObject.isChannel(currentChat) || currentChat.megagroup) && !availableReacts.isEmpty() && message.messageOwner.reactions.can_see_list;
        boolean isReactionsAvailable;
        if (message.isForwardedChannelPost()) {
            TLRPC.ChatFull chatInfo = getMessagesController().getChatFull(-message.getFromChatId());
            if (chatInfo == null) {
                isReactionsAvailable = true;
            } else {
                isReactionsAvailable = !isSecretChat() && !isInScheduleMode() && message.isReactionsAvailable() && (chatInfo != null && !chatInfo.available_reactions.isEmpty()) && !availableReacts.isEmpty();
            }
        } else {
            isReactionsAvailable = !isSecretChat() && !isInScheduleMode() && message.isReactionsAvailable() && (chatInfo != null && !chatInfo.available_reactions.isEmpty() || (chatInfo == null && !ChatObject.isChannel(currentChat)) || currentUser != null) && !availableReacts.isEmpty();
        }
        boolean showMessageSeen = !isReactionsViewAvailable && !isInScheduleMode() && currentChat != null && message.isOutOwner() && message.isSent() && !message.isEditing() && !message.isSending() && !message.isSendError() && !message.isContentUnread() && !message.isUnread() && (ConnectionsManager.getInstance(currentAccount).getCurrentTime() - message.messageOwner.date < getMessagesController().chatReadMarkExpirePeriod) && (ChatObject.isMegagroup(currentChat) || !ChatObject.isChannel(currentChat)) && chatInfo != null && chatInfo.participants_count < getMessagesController().chatReadMarkSizeThreshold && !(message.messageOwner.action instanceof TLRPC.TL_messageActionChatJoinedByRequest) && (v instanceof ChatMessageCell);
        int flags = 0;
        if (isReactionsViewAvailable || showMessageSeen) {
            flags |= ActionBarPopupWindow.ActionBarPopupWindowLayout.FLAG_USE_SWIPEBACK;
        }
        ActionBarPopupWindow.ActionBarPopupWindowLayout popupLayout = new ActionBarPopupWindow.ActionBarPopupWindowLayout(getParentActivity(), R.drawable.popup_fixed_alert, themeDelegate, flags);
        popupLayout.setMinimumWidth(AndroidUtilities.dp(200));
        Rect backgroundPaddings = new Rect();
        Drawable shadowDrawable = getParentActivity().getResources().getDrawable(R.drawable.popup_fixed_alert).mutate();
        shadowDrawable.getPadding(backgroundPaddings);
        popupLayout.setBackgroundColor(getThemedColor(Theme.key_actionBarDefaultSubmenuBackground));
        if (isReactionsViewAvailable) {
            ReactedHeaderView reactedView = new ReactedHeaderView(contentView.getContext(), currentAccount, message, dialog_id);
            int count = 0;
            if (message.messageOwner.reactions != null) {
                for (TLRPC.TL_reactionCount r : message.messageOwner.reactions.results) {
                    count += r.count;
                }
            }
            boolean hasHeader = count > 10;
            LinearLayout linearLayout = new LinearLayout(contentView.getContext()) {

                @Override
                protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
                    int size = MeasureSpec.getSize(widthMeasureSpec);
                    if (size < AndroidUtilities.dp(240)) {
                        size = AndroidUtilities.dp(240);
                    }
                    super.onMeasure(MeasureSpec.makeMeasureSpec(size, MeasureSpec.EXACTLY), heightMeasureSpec);
                }
            };
            linearLayout.setOrientation(LinearLayout.VERTICAL);
            linearLayout.setLayoutParams(new FrameLayout.LayoutParams(AndroidUtilities.dp(200), AndroidUtilities.dp(6 * 48 + (hasHeader ? 44 * 2 + 8 : 44)) + (!hasHeader ? 1 : 0)));
            ActionBarMenuSubItem backCell = new ActionBarMenuSubItem(getParentActivity(), true, false, themeDelegate);
            backCell.setItemHeight(44);
            backCell.setTextAndIcon(LocaleController.getString("Back", R.string.Back), R.drawable.msg_arrow_back);
            backCell.getTextView().setPadding(LocaleController.isRTL ? 0 : AndroidUtilities.dp(40), 0, LocaleController.isRTL ? AndroidUtilities.dp(40) : 0, 0);
            backCell.setOnClickListener(v1 -> popupLayout.getSwipeBack().closeForeground());
            linearLayout.addView(backCell, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
            int[] foregroundIndex = new int[1];
            if (hasHeader) {
                List<TLRPC.TL_reactionCount> counters = message.messageOwner.reactions.results;
                LinearLayout tabsView = new LinearLayout(contentView.getContext());
                tabsView.setOrientation(LinearLayout.HORIZONTAL);
                ViewPager pager = new ViewPager(contentView.getContext());
                HorizontalScrollView tabsScrollView = new HorizontalScrollView(contentView.getContext());
                AtomicBoolean suppressTabsScroll = new AtomicBoolean();
                int size = counters.size() + 1;
                for (int i = 0; i < size; i++) {
                    ReactionTabHolderView hv = new ReactionTabHolderView(contentView.getContext());
                    if (i == 0) {
                        hv.setCounter(count);
                    } else
                        hv.setCounter(currentAccount, counters.get(i - 1));
                    int finalI = i;
                    hv.setOnClickListener(v1 -> {
                        int from = pager.getCurrentItem();
                        if (finalI == from)
                            return;
                        ReactionTabHolderView fv = (ReactionTabHolderView) tabsView.getChildAt(from);
                        suppressTabsScroll.set(true);
                        pager.setCurrentItem(finalI, true);
                        float fSX = tabsScrollView.getScrollX(), tSX = hv.getX() - (tabsScrollView.getWidth() - hv.getWidth()) / 2f;
                        ValueAnimator a = ValueAnimator.ofFloat(0, 1).setDuration(150);
                        a.setInterpolator(CubicBezierInterpolator.DEFAULT);
                        a.addUpdateListener(animation -> {
                            float f = (float) animation.getAnimatedValue();
                            tabsScrollView.setScrollX((int) (fSX + (tSX - fSX) * f));
                            fv.setOutlineProgress(1f - f);
                            hv.setOutlineProgress(f);
                        });
                        a.start();
                    });
                    tabsView.addView(hv, LayoutHelper.createFrameRelatively(LayoutHelper.WRAP_CONTENT, LayoutHelper.MATCH_PARENT, Gravity.CENTER_VERTICAL, i == 0 ? 6 : 0, 6, 6, 6));
                }
                tabsScrollView.setHorizontalScrollBarEnabled(false);
                tabsScrollView.addView(tabsView);
                linearLayout.addView(tabsScrollView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 44));
                View divider = new FrameLayout(contentView.getContext());
                divider.setBackgroundColor(Theme.getColor(Theme.key_graySection));
                linearLayout.addView(divider, new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, (int) Theme.dividerPaint.getStrokeWidth()));
                int head = AndroidUtilities.dp(44 * 2) + 1;
                SparseArray<ReactedUsersListView> cachedViews = new SparseArray<>();
                SparseIntArray cachedHeights = new SparseIntArray();
                for (int i = 0; i < counters.size() + 1; i++) cachedHeights.put(i, head + AndroidUtilities.dp(ReactedUsersListView.ITEM_HEIGHT_DP * ReactedUsersListView.VISIBLE_ITEMS));
                pager.setAdapter(new PagerAdapter() {

                    @Override
                    public int getCount() {
                        return counters.size() + 1;
                    }

                    @Override
                    public boolean isViewFromObject(View view, Object object) {
                        return view == object;
                    }

                    @Override
                    public Object instantiateItem(ViewGroup container, int position) {
                        View cached = cachedViews.get(position);
                        if (cached != null) {
                            container.addView(cached);
                            return cached;
                        }
                        ReactedUsersListView v = new ReactedUsersListView(container.getContext(), themeDelegate, currentAccount, message, position == 0 ? null : counters.get(position - 1), true).setSeenUsers(reactedView.getSeenUsers()).setOnProfileSelectedListener((view, userId) -> {
                            Bundle args = new Bundle();
                            args.putLong("user_id", userId);
                            ProfileActivity fragment = new ProfileActivity(args);
                            presentFragment(fragment);
                            closeMenu();
                        }).setOnHeightChangedListener((view, newHeight) -> {
                            cachedHeights.put(position, head + newHeight);
                            if (pager.getCurrentItem() == position)
                                popupLayout.getSwipeBack().setNewForegroundHeight(foregroundIndex[0], head + newHeight);
                        });
                        if (position == 0)
                            reactedView.setSeenCallback(v::setSeenUsers);
                        container.addView(v);
                        cachedViews.put(position, v);
                        return v;
                    }

                    @Override
                    public void destroyItem(ViewGroup container, int position, Object object) {
                        container.removeView((View) object);
                    }
                });
                pager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {

                    @Override
                    public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
                        if (!suppressTabsScroll.get()) {
                            float fX = -1, tX = -1;
                            for (int i = 0; i < tabsView.getChildCount(); i++) {
                                ReactionTabHolderView ch = (ReactionTabHolderView) tabsView.getChildAt(i);
                                ch.setOutlineProgress(i == position ? 1f - positionOffset : i == (position + 1) % size ? positionOffset : 0);
                                if (i == position) {
                                    fX = ch.getX() - (tabsScrollView.getWidth() - ch.getWidth()) / 2f;
                                }
                                if (i == position + 1) {
                                    tX = ch.getX() - (tabsScrollView.getWidth() - ch.getWidth()) / 2f;
                                }
                            }
                            if (fX != -1 && tX != -1)
                                tabsScrollView.setScrollX((int) (fX + (tX - fX) * positionOffset));
                        }
                    }

                    @Override
                    public void onPageSelected(int position) {
                        int h = cachedHeights.get(position);
                        popupLayout.getSwipeBack().setNewForegroundHeight(foregroundIndex[0], h);
                    }

                    @Override
                    public void onPageScrollStateChanged(int state) {
                        if (state == ViewPager.SCROLL_STATE_IDLE) {
                            suppressTabsScroll.set(false);
                        }
                    }
                });
                linearLayout.addView(pager, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 0, 1f));
            } else {
                View gap = new FrameLayout(contentView.getContext());
                gap.setBackgroundColor(Theme.getColor(Theme.key_graySection));
                linearLayout.addView(gap, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 8));
                ReactedUsersListView lv = new ReactedUsersListView(contentView.getContext(), themeDelegate, currentAccount, message, null, true).setSeenUsers(reactedView.getSeenUsers()).setOnProfileSelectedListener((view, userId) -> {
                    Bundle args = new Bundle();
                    args.putLong("user_id", userId);
                    ProfileActivity fragment = new ProfileActivity(args);
                    presentFragment(fragment);
                    closeMenu();
                }).setOnHeightChangedListener((view, newHeight) -> popupLayout.getSwipeBack().setNewForegroundHeight(foregroundIndex[0], AndroidUtilities.dp(44 + 8) + newHeight));
                reactedView.setSeenCallback(lv::setSeenUsers);
                linearLayout.addView(lv, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 0, 1f));
            }
            foregroundIndex[0] = popupLayout.addViewToSwipeBack(linearLayout);
            reactedView.setOnClickListener(v1 -> {
                popupLayout.getSwipeBack().openForeground(foregroundIndex[0]);
            });
            popupLayout.addView(reactedView, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 48));
            View gap = new FrameLayout(contentView.getContext());
            gap.setBackgroundColor(Theme.getColor(Theme.key_graySection));
            popupLayout.addView(gap, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 8));
        }
        MessageSeenView messageSeenView = null;
        if (showMessageSeen) {
            messageSeenView = new MessageSeenView(contentView.getContext(), currentAccount, message, currentChat);
            FrameLayout messageSeenLayout = new FrameLayout(contentView.getContext());
            messageSeenLayout.addView(messageSeenView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT));
            MessageSeenView finalMessageSeenView = messageSeenView;
            ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getParentActivity(), true, true, themeDelegate);
            cell.setItemHeight(44);
            cell.setTextAndIcon(LocaleController.getString("Back", R.string.Back), R.drawable.msg_arrow_back);
            cell.getTextView().setPadding(LocaleController.isRTL ? 0 : AndroidUtilities.dp(40), 0, LocaleController.isRTL ? AndroidUtilities.dp(40) : 0, 0);
            FrameLayout backContainer = new FrameLayout(contentView.getContext());
            LinearLayout linearLayout = new LinearLayout(contentView.getContext());
            linearLayout.setBackgroundColor(getThemedColor(Theme.key_actionBarDefaultSubmenuBackground));
            linearLayout.setOrientation(LinearLayout.VERTICAL);
            RecyclerListView listView2 = finalMessageSeenView.createListView();
            backContainer.addView(cell);
            linearLayout.addView(backContainer);
            backContainer.setOnClickListener(new View.OnClickListener() {

                @Override
                public void onClick(View view) {
                    popupLayout.getSwipeBack().closeForeground();
                }
            });
            int[] foregroundIndex = new int[1];
            messageSeenView.setOnClickListener(new View.OnClickListener() {

                @Override
                public void onClick(View view) {
                    if (scrimPopupWindow == null || finalMessageSeenView.users.isEmpty()) {
                        return;
                    }
                    if (finalMessageSeenView.users.size() == 1) {
                        TLRPC.User user = finalMessageSeenView.users.get(0);
                        if (user == null) {
                            return;
                        }
                        Bundle args = new Bundle();
                        args.putLong("user_id", user.id);
                        ProfileActivity fragment = new ProfileActivity(args);
                        presentFragment(fragment);
                        closeMenu();
                        return;
                    }
                    int totalHeight = contentView.getHeightWithKeyboard();
                    int availableHeight = totalHeight - scrimPopupY - AndroidUtilities.dp(46 + 16) - (isReactionsAvailable ? AndroidUtilities.dp(52) : 0);
                    if (SharedConfig.messageSeenHintCount > 0 && contentView.getKeyboardHeight() < AndroidUtilities.dp(20)) {
                        availableHeight -= AndroidUtilities.dp(52);
                        Bulletin bulletin = BulletinFactory.of(ChatActivity.this).createErrorBulletin(AndroidUtilities.replaceTags(LocaleController.getString("MessageSeenTooltipMessage", R.string.MessageSeenTooltipMessage)));
                        bulletin.tag = 1;
                        bulletin.setDuration(4000);
                        bulletin.show();
                        SharedConfig.updateMessageSeenHintCount(SharedConfig.messageSeenHintCount - 1);
                    } else if (contentView.getKeyboardHeight() > AndroidUtilities.dp(20)) {
                        availableHeight -= contentView.getKeyboardHeight() / 3f;
                    }
                    int listViewTotalHeight = AndroidUtilities.dp(8) + AndroidUtilities.dp(44) * listView2.getAdapter().getItemCount();
                    if (listViewTotalHeight > availableHeight) {
                        if (availableHeight > AndroidUtilities.dp(620)) {
                            listView2.getLayoutParams().height = AndroidUtilities.dp(620);
                        } else {
                            listView2.getLayoutParams().height = availableHeight;
                        }
                    } else {
                        listView2.getLayoutParams().height = listViewTotalHeight;
                    }
                    linearLayout.getLayoutParams().height = AndroidUtilities.dp(44) + listView2.getLayoutParams().height;
                    listView2.requestLayout();
                    linearLayout.requestLayout();
                    listView2.getAdapter().notifyDataSetChanged();
                    popupLayout.getSwipeBack().openForeground(foregroundIndex[0]);
                }
            });
            linearLayout.addView(listView2, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 320));
            listView2.setOnItemClickListener((view1, position) -> {
                TLRPC.User user = finalMessageSeenView.users.get(position);
                if (user == null) {
                    return;
                }
                Bundle args = new Bundle();
                args.putLong("user_id", user.id);
                ProfileActivity fragment = new ProfileActivity(args);
                presentFragment(fragment);
            });
            foregroundIndex[0] = popupLayout.addViewToSwipeBack(linearLayout);
            popupLayout.addView(messageSeenLayout, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 44));
            View gap = new FrameLayout(contentView.getContext());
            gap.setBackgroundColor(Theme.getColor(Theme.key_graySection));
            popupLayout.addView(gap, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 8));
        }
        if (popupLayout.getSwipeBack() != null) {
            popupLayout.getSwipeBack().setOnClickListener(e -> closeMenu());
        }
        scrimPopupWindowItems = new ActionBarMenuSubItem[items.size() + (selectedObject.isSponsored() ? 1 : 0)];
        for (int a = 0, N = items.size(); a < N; a++) {
            if (a == 0 && selectedObject.isSponsored()) {
                ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getParentActivity(), true, true, themeDelegate);
                cell.setTextAndIcon(LocaleController.getString("SponsoredMessageInfo", R.string.SponsoredMessageInfo), R.drawable.menu_info);
                cell.setItemHeight(56);
                cell.setTag(R.id.width_tag, 240);
                cell.setMultiline();
                scrimPopupWindowItems[scrimPopupWindowItems.length - 1] = cell;
                popupLayout.addView(cell);
                cell.setOnClickListener(v1 -> {
                    if (contentView == null || getParentActivity() == null) {
                        return;
                    }
                    BottomSheet.Builder builder = new BottomSheet.Builder(contentView.getContext());
                    builder.setCustomView(new SponsoredMessageInfoView(getParentActivity(), themeDelegate));
                    builder.show();
                });
                View gap = new View(getParentActivity());
                gap.setMinimumWidth(AndroidUtilities.dp(196));
                gap.setTag(1000);
                gap.setTag(R.id.object_tag, 1);
                popupLayout.addView(gap);
                LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) cell.getLayoutParams();
                if (LocaleController.isRTL) {
                    layoutParams.gravity = Gravity.RIGHT;
                }
                layoutParams.width = LayoutHelper.MATCH_PARENT;
                layoutParams.height = AndroidUtilities.dp(6);
                gap.setLayoutParams(layoutParams);
            }
            ActionBarMenuSubItem cell = new ActionBarMenuSubItem(getParentActivity(), a == 0, a == N - 1, themeDelegate);
            cell.setMinimumWidth(AndroidUtilities.dp(200));
            cell.setTextAndIcon(items.get(a), icons.get(a));
            Integer option = options.get(a);
            if (option == 1 && selectedObject.messageOwner.ttl_period != 0) {
                menuDeleteItem = cell;
                updateDeleteItemRunnable.run();
                cell.setSubtextColor(getThemedColor(Theme.key_windowBackgroundWhiteGrayText6));
            }
            scrimPopupWindowItems[a] = cell;
            popupLayout.addView(cell);
            final int i = a;
            cell.setOnClickListener(v1 -> {
                if (selectedObject == null || i >= options.size()) {
                    return;
                }
                processSelectedOption(options.get(i));
            });
            if (option == 29) {
                // "Translate" button
                String toLang = LocaleController.getInstance().getCurrentLocale().getLanguage();
                final CharSequence finalMessageText = messageText;
                TranslateAlert.OnLinkPress onLinkPress = (link) -> {
                    didPressMessageUrl(link, false, selectedObject, v instanceof ChatMessageCell ? (ChatMessageCell) v : null);
                };
                TLRPC.InputPeer inputPeer = getMessagesController().getInputPeer(dialog_id);
                int messageId = selectedObject.messageOwner.id;
                /*if (LanguageDetector.hasSupport()) {
                        final String[] fromLang = { null };
                        cell.setVisibility(View.GONE);
                        waitForLangDetection.set(true);
                        LanguageDetector.detectLanguage(
                            finalMessageText.toString(),
                            (String lang) -> {
                                fromLang[0] = lang;
                                if (fromLang[0] != null && (!fromLang[0].equals(toLang) || fromLang[0].equals("und")) &&
                                        !RestrictedLanguagesSelectActivity.getRestrictedLanguages().contains(fromLang[0])) {
                                    cell.setVisibility(View.VISIBLE);
                                }
                                waitForLangDetection.set(false);
                                if (onLangDetectionDone.get() != null) {
                                    onLangDetectionDone.get().run();
                                    onLangDetectionDone.set(null);
                                }
                            },
                            (Exception e) -> {
                                FileLog.e("mlkit: failed to detect language in message");
                                e.printStackTrace();
                                waitForLangDetection.set(false);
                                if (onLangDetectionDone.get() != null) {
                                    onLangDetectionDone.get().run();
                                    onLangDetectionDone.set(null);
                                }
                            }
                        );
                        cell.setOnClickListener(e -> {
                            if (selectedObject == null || i >= options.size() || getParentActivity() == null) {
                                return;
                            }
                            TranslateAlert alert = TranslateAlert.showAlert(getParentActivity(), this, currentAccount, inputPeer, messageId, fromLang[0], toLang, finalMessageText, noforwards, onLinkPress, () -> dimBehindView(false));
                            alert.showDim(false);
                            closeMenu(false);
                        });
                        cell.postDelayed(() -> {
                            if (onLangDetectionDone.get() != null) {
                                onLangDetectionDone.getAndSet(null).run();
                            }
                        }, 250);
                    } else {*/
                cell.setOnClickListener(e -> {
                    if (selectedObject == null || i >= options.size() || getParentActivity() == null) {
                        return;
                    }
                    TranslateAlert alert = TranslateAlert.showAlert(getParentActivity(), this, currentAccount, inputPeer, messageId, "und", toLang, finalMessageText, noforwards, onLinkPress, () -> dimBehindView(false));
                    alert.showDim(false);
                    closeMenu(false);
                });
            // }
            }
        }
        ChatScrimPopupContainerLayout scrimPopupContainerLayout = new ChatScrimPopupContainerLayout(contentView.getContext()) {

            @Override
            public boolean dispatchKeyEvent(KeyEvent event) {
                if (event.getKeyCode() == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
                    closeMenu();
                }
                return super.dispatchKeyEvent(event);
            }

            @Override
            public boolean dispatchTouchEvent(MotionEvent ev) {
                boolean b = super.dispatchTouchEvent(ev);
                if (ev.getAction() == MotionEvent.ACTION_DOWN && !b) {
                    closeMenu();
                }
                return b;
            }
        };
        scrimPopupContainerLayout.setOnTouchListener(new View.OnTouchListener() {

            private int[] pos = new int[2];

            @Override
            public boolean onTouch(View v, MotionEvent event) {
                if (event.getActionMasked() == MotionEvent.ACTION_DOWN) {
                    if (scrimPopupWindow != null && scrimPopupWindow.isShowing()) {
                        View contentView = scrimPopupWindow.getContentView();
                        contentView.getLocationInWindow(pos);
                        rect.set(pos[0], pos[1], pos[0] + contentView.getMeasuredWidth(), pos[1] + contentView.getMeasuredHeight());
                        if (!rect.contains((int) event.getX(), (int) event.getY())) {
                            closeMenu();
                        }
                    }
                } else if (event.getActionMasked() == MotionEvent.ACTION_OUTSIDE) {
                    closeMenu();
                }
                return false;
            }
        });
        ReactionsContainerLayout reactionsLayout = new ReactionsContainerLayout(contentView.getContext(), currentAccount, getResourceProvider());
        if (isReactionsAvailable) {
            int pad = 22;
            int sPad = 24;
            reactionsLayout.setPadding(AndroidUtilities.dp(4) + (LocaleController.isRTL ? 0 : sPad), AndroidUtilities.dp(4), AndroidUtilities.dp(4) + (LocaleController.isRTL ? sPad : 0), AndroidUtilities.dp(pad));
            reactionsLayout.setDelegate((rView, reaction, longress) -> {
                selectReaction(primaryMessage, reactionsLayout, 0, 0, reaction, false, longress);
            });
            LinearLayout.LayoutParams params = LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, 52 + pad, Gravity.RIGHT, 0, 50, 0, -20);
            scrimPopupContainerLayout.addView(reactionsLayout, params);
            scrimPopupContainerLayout.reactionsLayout = reactionsLayout;
            scrimPopupContainerLayout.setClipChildren(false);
            reactionsLayout.setMessage(message, chatInfo);
            reactionsLayout.setTransitionProgress(0);
            if (popupLayout.getSwipeBack() != null) {
                popupLayout.getSwipeBack().setOnSwipeBackProgressListener((layout, toProgress, progress) -> {
                    if (toProgress == 0) {
                        reactionsLayout.startEnterAnimation();
                    } else if (toProgress == 1)
                        reactionsLayout.setAlpha(1f - progress);
                });
            }
        }
        boolean showNoForwards = noforwards && message.messageOwner.action == null && message.isSent() && !message.isEditing() && chatMode != MODE_SCHEDULED;
        scrimPopupContainerLayout.addView(popupLayout, LayoutHelper.createLinearRelatively(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT, isReactionsAvailable ? 16 : 0, 0, isReactionsAvailable ? 36 : 0, 0));
        scrimPopupContainerLayout.popupWindowLayout = popupLayout;
        if (showNoForwards) {
            popupLayout.measure(View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED), View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED));
            boolean isChannel = ChatObject.isChannel(currentChat) && !currentChat.megagroup;
            TextView tv = new TextView(contentView.getContext());
            tv.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 14);
            tv.setTextColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem));
            if (getMessagesController().isChatNoForwards(currentChat)) {
                tv.setText(isChannel ? LocaleController.getString("ForwardsRestrictedInfoChannel", R.string.ForwardsRestrictedInfoChannel) : LocaleController.getString("ForwardsRestrictedInfoGroup", R.string.ForwardsRestrictedInfoGroup));
            } else {
                tv.setText(LocaleController.getString("ForwardsRestrictedInfoBot", R.string.ForwardsRestrictedInfoBot));
            }
            tv.setMaxWidth(popupLayout.getMeasuredWidth() - AndroidUtilities.dp(38));
            Drawable shadowDrawable2 = ContextCompat.getDrawable(contentView.getContext(), R.drawable.popup_fixed_alert).mutate();
            shadowDrawable2.setColorFilter(new PorterDuffColorFilter(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground), PorterDuff.Mode.MULTIPLY));
            FrameLayout fl = new FrameLayout(contentView.getContext());
            fl.setBackground(shadowDrawable2);
            fl.addView(tv, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, 0, 11, 11, 11, 11));
            scrimPopupContainerLayout.addView(fl, LayoutHelper.createLinear(LayoutHelper.MATCH_PARENT, LayoutHelper.WRAP_CONTENT, Gravity.LEFT, isReactionsAvailable ? 16 : 0, -8, isReactionsAvailable ? 36 : 0, 0));
        }
        scrimPopupWindow = new ActionBarPopupWindow(scrimPopupContainerLayout, LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT) {

            @Override
            public void dismiss() {
                super.dismiss();
                if (scrimPopupWindow != this) {
                    return;
                }
                scrimPopupWindow = null;
                menuDeleteItem = null;
                scrimPopupWindowItems = null;
                chatLayoutManager.setCanScrollVertically(true);
                if (scrimPopupWindowHideDimOnDismiss) {
                    dimBehindView(false);
                } else {
                    scrimPopupWindowHideDimOnDismiss = true;
                }
                if (chatActivityEnterView != null) {
                    chatActivityEnterView.getEditField().setAllowDrawCursor(true);
                }
            }
        };
        scrimPopupWindow.setPauseNotifications(true);
        scrimPopupWindow.setDismissAnimationDuration(220);
        scrimPopupWindow.setOutsideTouchable(true);
        scrimPopupWindow.setClippingEnabled(true);
        scrimPopupWindow.setAnimationStyle(R.style.PopupContextAnimation);
        scrimPopupWindow.setFocusable(true);
        scrimPopupContainerLayout.measure(View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(1000), View.MeasureSpec.AT_MOST), View.MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(1000), View.MeasureSpec.AT_MOST));
        scrimPopupWindow.setInputMethodMode(ActionBarPopupWindow.INPUT_METHOD_NOT_NEEDED);
        scrimPopupWindow.setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_UNSPECIFIED);
        scrimPopupWindow.getContentView().setFocusableInTouchMode(true);
        popupLayout.setFitItems(true);
        int popupX = v.getLeft() + (int) x - scrimPopupContainerLayout.getMeasuredWidth() + backgroundPaddings.left - AndroidUtilities.dp(28);
        if (popupX < AndroidUtilities.dp(6)) {
            popupX = AndroidUtilities.dp(6);
        } else if (popupX > chatListView.getMeasuredWidth() - AndroidUtilities.dp(6) - scrimPopupContainerLayout.getMeasuredWidth()) {
            popupX = chatListView.getMeasuredWidth() - AndroidUtilities.dp(6) - scrimPopupContainerLayout.getMeasuredWidth();
        }
        if (AndroidUtilities.isTablet()) {
            int[] location = new int[2];
            fragmentView.getLocationInWindow(location);
            popupX += location[0];
        }
        int totalHeight = contentView.getHeight();
        int height = scrimPopupContainerLayout.getMeasuredHeight() + AndroidUtilities.dp(48);
        int keyboardHeight = contentView.measureKeyboardHeight();
        if (keyboardHeight > AndroidUtilities.dp(20)) {
            totalHeight += keyboardHeight;
        }
        int popupY;
        if (height < totalHeight) {
            popupY = (int) (chatListView.getY() + v.getTop() + y);
            if (height - backgroundPaddings.top - backgroundPaddings.bottom > AndroidUtilities.dp(240)) {
                popupY += AndroidUtilities.dp(240) - height;
            }
            if (popupY < chatListView.getY() + AndroidUtilities.dp(24)) {
                popupY = (int) (chatListView.getY() + AndroidUtilities.dp(24));
            } else if (popupY > totalHeight - height - AndroidUtilities.dp(8)) {
                popupY = totalHeight - height - AndroidUtilities.dp(8);
            }
        } else {
            popupY = inBubbleMode ? 0 : AndroidUtilities.statusBarHeight;
        }
        final int finalPopupX = scrimPopupX = popupX;
        final int finalPopupY = scrimPopupY = popupY;
        Runnable showMenu = () -> {
            if (scrimPopupWindow == null || fragmentView == null) {
                return;
            }
            scrimPopupWindow.showAtLocation(chatListView, Gravity.LEFT | Gravity.TOP, finalPopupX, finalPopupY);
            if (isReactionsAvailable) {
                reactionsLayout.startEnterAnimation();
            }
        };
        if (waitForLangDetection.get()) {
            onLangDetectionDone.set(showMenu);
        } else {
            showMenu.run();
        }
        chatListView.stopScroll();
        chatLayoutManager.setCanScrollVertically(false);
        dimBehindView(v, true);
        hideHints(false);
        if (topUndoView != null) {
            topUndoView.hide(true, 1);
        }
        if (undoView != null) {
            undoView.hide(true, 1);
        }
        if (chatActivityEnterView != null) {
            chatActivityEnterView.getEditField().setAllowDrawCursor(false);
        }
        return;
    }
    if (chatActivityEnterView != null && (chatActivityEnterView.isRecordingAudioVideo() || chatActivityEnterView.isRecordLocked())) {
        return;
    }
    final ActionBarMenu actionMode = actionBar.createActionMode();
    View item = actionMode.getItem(delete);
    if (item != null) {
        item.setVisibility(View.VISIBLE);
    }
    bottomMessagesActionContainer.setVisibility(View.VISIBLE);
    int translationY = chatActivityEnterView.getMeasuredHeight() - AndroidUtilities.dp(51);
    if (chatActivityEnterView.getVisibility() == View.VISIBLE) {
        ArrayList<View> views = new ArrayList<>();
        views.add(chatActivityEnterView);
        if (mentionContainer != null && mentionContainer.getVisibility() == View.VISIBLE) {
            views.add(mentionContainer);
        }
        if (stickersPanel != null && stickersPanel.getVisibility() == View.VISIBLE) {
            views.add(stickersPanel);
        }
        actionBar.showActionMode(true, bottomMessagesActionContainer, null, views.toArray(new View[0]), new boolean[] { false, true, true }, chatListView, translationY);
        if (getParentActivity() instanceof LaunchActivity) {
            ((LaunchActivity) getParentActivity()).hideVisibleActionMode();
        }
        chatActivityEnterView.getEditField().setAllowDrawCursor(false);
    } else if (bottomOverlayChat.getVisibility() == View.VISIBLE) {
        actionBar.showActionMode(true, bottomMessagesActionContainer, null, new View[] { bottomOverlayChat }, new boolean[] { true }, chatListView, translationY);
    } else {
        actionBar.showActionMode(true, bottomMessagesActionContainer, null, null, null, chatListView, translationY);
    }
    closeMenu();
    chatLayoutManager.setCanScrollVertically(true);
    updatePinnedMessageView(true);
    AnimatorSet animatorSet = new AnimatorSet();
    ArrayList<Animator> animators = new ArrayList<>();
    for (int a = 0; a < actionModeViews.size(); a++) {
        View view = actionModeViews.get(a);
        view.setPivotY(ActionBar.getCurrentActionBarHeight() / 2);
        AndroidUtilities.clearDrawableAnimation(view);
        animators.add(ObjectAnimator.ofFloat(view, View.SCALE_Y, 0.1f, 1.0f));
    }
    animatorSet.playTogether(animators);
    animatorSet.setDuration(250);
    animatorSet.start();
    addToSelectedMessages(message, listView);
    if (chatActivityEnterView != null) {
        chatActivityEnterView.preventInput = true;
    }
    selectedMessagesCountTextView.setNumber(selectedMessagesIds[0].size() + selectedMessagesIds[1].size(), false);
    updateVisibleRows();
    if (chatActivityEnterView != null) {
        chatActivityEnterView.hideBotCommands();
    }
}
Also used : ViewHelper(org.telegram.ui.Components.ViewHelper) Bundle(android.os.Bundle) BotHelpCell(org.telegram.ui.Cells.BotHelpCell) AdjustPanLayoutHelper(org.telegram.ui.ActionBar.AdjustPanLayoutHelper) StickersAlert(org.telegram.ui.Components.StickersAlert) RecyclerAnimationScrollHelper(org.telegram.ui.Components.RecyclerAnimationScrollHelper) URLSpanUserMention(org.telegram.ui.Components.URLSpanUserMention) Property(android.util.Property) HorizontalScrollView(android.widget.HorizontalScrollView) ChatThemeController(org.telegram.messenger.ChatThemeController) MediaStore(android.provider.MediaStore) Map(java.util.Map) Shader(android.graphics.Shader) ContextCompat(androidx.core.content.ContextCompat) NotificationCenter(org.telegram.messenger.NotificationCenter) PinnedLineView(org.telegram.ui.Components.PinnedLineView) CountDownLatch(java.util.concurrent.CountDownLatch) Layout(android.text.Layout) EmojiData(org.telegram.messenger.EmojiData) ForwardingMessagesParams(org.telegram.messenger.ForwardingMessagesParams) BotCommandsMenuView(org.telegram.ui.Components.BotCommandsMenuView) Paint(android.graphics.Paint) Path(android.graphics.Path) ReactedHeaderView(org.telegram.ui.Components.ReactedHeaderView) PipRoundVideoView(org.telegram.ui.Components.PipRoundVideoView) SystemClock(android.os.SystemClock) ChatBlurredFrameLayout(org.telegram.ui.Components.ChatBlurredFrameLayout) SpannableStringBuilder(android.text.SpannableStringBuilder) Calendar(java.util.Calendar) Toast(android.widget.Toast) PhoneFormat(org.telegram.PhoneFormat.PhoneFormat) Menu(android.view.Menu) SizeNotifierFrameLayout(org.telegram.ui.Components.SizeNotifierFrameLayout) JoinGroupAlert(org.telegram.ui.Components.JoinGroupAlert) AspectRatioFrameLayout(com.google.android.exoplayer2.ui.AspectRatioFrameLayout) LongSparseIntArray(org.telegram.messenger.support.LongSparseIntArray) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) URLSpan(android.text.style.URLSpan) ActionBarMenu(org.telegram.ui.ActionBar.ActionBarMenu) R(org.telegram.messenger.R) BottomSheet(org.telegram.ui.ActionBar.BottomSheet) ChatActivityMemberRequestsDelegate(org.telegram.ui.Delegates.ChatActivityMemberRequestsDelegate) UserObject(org.telegram.messenger.UserObject) SharedPreferences(android.content.SharedPreferences) ContactsController(org.telegram.messenger.ContactsController) MessagesStorage(org.telegram.messenger.MessagesStorage) EditText(android.widget.EditText) Rect(android.graphics.Rect) LinearLayout(android.widget.LinearLayout) URLDecoder(java.net.URLDecoder) PackageManager(android.content.pm.PackageManager) WindowManager(android.view.WindowManager) Animator(android.animation.Animator) TypefaceSpan(org.telegram.ui.Components.TypefaceSpan) ChatAttachAlertDocumentLayout(org.telegram.ui.Components.ChatAttachAlertDocumentLayout) DatePickerDialog(android.app.DatePickerDialog) ChatMessageCell(org.telegram.ui.Cells.ChatMessageCell) RecyclerView(androidx.recyclerview.widget.RecyclerView) StickersAdapter(org.telegram.ui.Adapters.StickersAdapter) RectF(android.graphics.RectF) ReportAlert(org.telegram.ui.Components.ReportAlert) TextSelectionHint(org.telegram.ui.Components.TextSelectionHint) BaseFragment(org.telegram.ui.ActionBar.BaseFragment) ChatActionCell(org.telegram.ui.Cells.ChatActionCell) ChatThemeBottomSheet(org.telegram.ui.Components.ChatThemeBottomSheet) PorterDuff(android.graphics.PorterDuff) SendMessagesHelper(org.telegram.messenger.SendMessagesHelper) BackDrawable(org.telegram.ui.ActionBar.BackDrawable) ShareAlert(org.telegram.ui.Components.ShareAlert) BluredView(org.telegram.ui.Components.BluredView) UserConfig(org.telegram.messenger.UserConfig) TextStyleSpan(org.telegram.ui.Components.TextStyleSpan) EmojiThemes(org.telegram.ui.ActionBar.EmojiThemes) InstantCameraView(org.telegram.ui.Components.InstantCameraView) PhonebookShareAlert(org.telegram.ui.Components.PhonebookShareAlert) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) ImportingAlert(org.telegram.ui.Components.ImportingAlert) Spanned(android.text.Spanned) GridLayoutManager(androidx.recyclerview.widget.GridLayoutManager) SparseIntArray(android.util.SparseIntArray) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) LocaleController(org.telegram.messenger.LocaleController) ChatActivityEnterTopView(org.telegram.ui.Components.ChatActivityEnterTopView) ExtendedGridLayoutManager(org.telegram.ui.Components.ExtendedGridLayoutManager) ChatBigEmptyView(org.telegram.ui.Components.ChatBigEmptyView) ActionBar(org.telegram.ui.ActionBar.ActionBar) LinearSmoothScrollerCustom(androidx.recyclerview.widget.LinearSmoothScrollerCustom) TLObject(org.telegram.tgnet.TLObject) Size(org.telegram.ui.Components.Size) MessageObject(org.telegram.messenger.MessageObject) SharedConfig(org.telegram.messenger.SharedConfig) BuildVars(org.telegram.messenger.BuildVars) Build(android.os.Build) ChatAvatarContainer(org.telegram.ui.Components.ChatAvatarContainer) PollVotesAlert(org.telegram.ui.Components.PollVotesAlert) EmbedBottomSheet(org.telegram.ui.Components.EmbedBottomSheet) DialogObject(org.telegram.messenger.DialogObject) BackupImageView(org.telegram.ui.Components.BackupImageView) LayoutHelper(org.telegram.ui.Components.LayoutHelper) TextureView(android.view.TextureView) Color(android.graphics.Color) Bitmap(android.graphics.Bitmap) CharacterStyle(android.text.style.CharacterStyle) ViewTreeObserver(android.view.ViewTreeObserver) Vibrator(android.os.Vibrator) Comparator(java.util.Comparator) Activity(android.app.Activity) ImageReceiver(org.telegram.messenger.ImageReceiver) RecyclerListView(org.telegram.ui.Components.RecyclerListView) Arrays(java.util.Arrays) Uri(android.net.Uri) FrameLayout(android.widget.FrameLayout) ImageView(android.widget.ImageView) AnimatedFileDrawable(org.telegram.ui.Components.AnimatedFileDrawable) EditTextBoldCursor(org.telegram.ui.Components.EditTextBoldCursor) Drawable(android.graphics.drawable.Drawable) Bulletin(org.telegram.ui.Components.Bulletin) RadialProgressView(org.telegram.ui.Components.RadialProgressView) Manifest(android.Manifest) ActionBarMenuSubItem(org.telegram.ui.ActionBar.ActionBarMenuSubItem) Matcher(java.util.regex.Matcher) ChatGreetingsView(org.telegram.ui.Components.ChatGreetingsView) Canvas(android.graphics.Canvas) AccessibilityEvent(android.view.accessibility.AccessibilityEvent) Emoji(org.telegram.messenger.Emoji) MessagesSearchAdapter(org.telegram.ui.Adapters.MessagesSearchAdapter) ColorMatrix(android.graphics.ColorMatrix) ForegroundColorSpan(android.text.style.ForegroundColorSpan) TargetApi(android.annotation.TargetApi) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) BackButtonMenu(org.telegram.ui.Components.BackButtonMenu) ChatListItemAnimator(androidx.recyclerview.widget.ChatListItemAnimator) MentionsAdapter(org.telegram.ui.Adapters.MentionsAdapter) UndoView(org.telegram.ui.Components.UndoView) AnimationProperties(org.telegram.ui.Components.AnimationProperties) ColorMatrixColorFilter(android.graphics.ColorMatrixColorFilter) CounterView(org.telegram.ui.Components.CounterView) AnimatorListenerAdapter(android.animation.AnimatorListenerAdapter) TrendingStickersAlert(org.telegram.ui.Components.TrendingStickersAlert) Outline(android.graphics.Outline) HapticFeedbackConstants(android.view.HapticFeedbackConstants) TextPaint(android.text.TextPaint) BotSwitchCell(org.telegram.ui.Cells.BotSwitchCell) HintView(org.telegram.ui.Components.HintView) MessageBackgroundDrawable(org.telegram.ui.Components.MessageBackgroundDrawable) PorterDuffColorFilter(android.graphics.PorterDuffColorFilter) LinearLayoutManager(androidx.recyclerview.widget.LinearLayoutManager) URLSpanBotCommand(org.telegram.ui.Components.URLSpanBotCommand) ReactionsLayoutInBubble(org.telegram.ui.Components.Reactions.ReactionsLayoutInBubble) ExifInterface(androidx.exifinterface.media.ExifInterface) FileLoader(org.telegram.messenger.FileLoader) ContextLinkCell(org.telegram.ui.Cells.ContextLinkCell) ClearHistoryAlert(org.telegram.ui.Components.ClearHistoryAlert) Space(android.widget.Space) ViewPager(androidx.viewpager.widget.ViewPager) Dialog(android.app.Dialog) BitmapFactory(android.graphics.BitmapFactory) GigagroupConvertAlert(org.telegram.ui.Components.GigagroupConvertAlert) URLSpanMono(org.telegram.ui.Components.URLSpanMono) URLSpanNoUnderline(org.telegram.ui.Components.URLSpanNoUnderline) AlertsCreator(org.telegram.ui.Components.AlertsCreator) BlurBehindDrawable(org.telegram.ui.Components.BlurBehindDrawable) ArrayList(java.util.ArrayList) SharedMediaLayout(org.telegram.ui.Components.SharedMediaLayout) FragmentContextView(org.telegram.ui.Components.FragmentContextView) TLRPC(org.telegram.tgnet.TLRPC) EditTextCaption(org.telegram.ui.Components.EditTextCaption) BuildConfig(org.telegram.messenger.BuildConfig) DialogCell(org.telegram.ui.Cells.DialogCell) SpannableString(android.text.SpannableString) BufferedWriter(java.io.BufferedWriter) FileOutputStream(java.io.FileOutputStream) TextUtils(android.text.TextUtils) ChatUnreadCell(org.telegram.ui.Cells.ChatUnreadCell) ChatLoadingCell(org.telegram.ui.Cells.ChatLoadingCell) ClippingImageView(org.telegram.ui.Components.ClippingImageView) File(java.io.File) ReactionsEffectOverlay(org.telegram.ui.Components.Reactions.ReactionsEffectOverlay) Gravity(android.view.Gravity) PorterDuffXfermode(android.graphics.PorterDuffXfermode) TypedValue(android.util.TypedValue) Configuration(android.content.res.Configuration) StickerCell(org.telegram.ui.Cells.StickerCell) ReactionsContainerLayout(org.telegram.ui.Components.ReactionsContainerLayout) ColorUtils(androidx.core.graphics.ColorUtils) ChatObject(org.telegram.messenger.ChatObject) AlertDialog(org.telegram.ui.ActionBar.AlertDialog) VoIPHelper(org.telegram.ui.Components.voip.VoIPHelper) EmojiView(org.telegram.ui.Components.EmojiView) ValueAnimator(android.animation.ValueAnimator) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) ChatScrimPopupContainerLayout(org.telegram.ui.Components.ChatScrimPopupContainerLayout) ActionBarMenuItem(org.telegram.ui.ActionBar.ActionBarMenuItem) Spannable(android.text.Spannable) AccountInstance(org.telegram.messenger.AccountInstance) AndroidUtilities(org.telegram.messenger.AndroidUtilities) CubicBezierInterpolator(org.telegram.ui.Components.CubicBezierInterpolator) CheckBoxCell(org.telegram.ui.Cells.CheckBoxCell) ApplicationLoader(org.telegram.messenger.ApplicationLoader) ChecksHintView(org.telegram.ui.Components.ChecksHintView) MediaController(org.telegram.messenger.MediaController) ThemeEditorView(org.telegram.ui.Components.ThemeEditorView) View(android.view.View) Matrix(android.graphics.Matrix) SearchCounterView(org.telegram.ui.Components.SearchCounterView) ForwardingPreviewView(org.telegram.ui.Components.ForwardingPreviewView) BitmapShader(android.graphics.BitmapShader) Utilities(org.telegram.messenger.Utilities) HideViewAfterAnimation(org.telegram.ui.Components.HideViewAfterAnimation) ObjectAnimator(android.animation.ObjectAnimator) GridLayoutManagerFixed(androidx.recyclerview.widget.GridLayoutManagerFixed) ImageLocation(org.telegram.messenger.ImageLocation) MentionCell(org.telegram.ui.Cells.MentionCell) ReactionTabHolderView(org.telegram.ui.Components.ReactionTabHolderView) ConnectionsManager(org.telegram.tgnet.ConnectionsManager) ViewGroup(android.view.ViewGroup) SparseArray(android.util.SparseArray) List(java.util.List) TextView(android.widget.TextView) MotionBackgroundDrawable(org.telegram.ui.Components.MotionBackgroundDrawable) SecretChatHelper(org.telegram.messenger.SecretChatHelper) FileProvider(androidx.core.content.FileProvider) Pattern(java.util.regex.Pattern) DecelerateInterpolator(android.view.animation.DecelerateInterpolator) ActionBarPopupWindow(org.telegram.ui.ActionBar.ActionBarPopupWindow) Typeface(android.graphics.Typeface) Context(android.content.Context) StaticLayout(android.text.StaticLayout) AccessibilityNodeInfo(android.view.accessibility.AccessibilityNodeInfo) TextSelectionHelper(org.telegram.ui.Cells.TextSelectionHelper) ReactedUsersListView(org.telegram.ui.Components.ReactedUsersListView) KeyEvent(android.view.KeyEvent) VoIPService(org.telegram.messenger.voip.VoIPService) Theme(org.telegram.ui.ActionBar.Theme) PagerAdapter(androidx.viewpager.widget.PagerAdapter) ViewOutlineProvider(android.view.ViewOutlineProvider) BulletinFactory(org.telegram.ui.Components.BulletinFactory) Intent(android.content.Intent) HashMap(java.util.HashMap) ActionBarLayout(org.telegram.ui.ActionBar.ActionBarLayout) TranslateAlert(org.telegram.ui.Components.TranslateAlert) AtomicReference(java.util.concurrent.atomic.AtomicReference) ClipData(android.content.ClipData) SuppressLint(android.annotation.SuppressLint) VideoEditedInfo(org.telegram.messenger.VideoEditedInfo) MotionEvent(android.view.MotionEvent) AnimatorSet(android.animation.AnimatorSet) MediaDataController(org.telegram.messenger.MediaDataController) DialogInterface(android.content.DialogInterface) Browser(org.telegram.messenger.browser.Browser) FireworksOverlay(org.telegram.ui.Components.FireworksOverlay) LongSparseArray(androidx.collection.LongSparseArray) FileWriter(java.io.FileWriter) FileLog(org.telegram.messenger.FileLog) URLSpanReplacement(org.telegram.ui.Components.URLSpanReplacement) MessagesController(org.telegram.messenger.MessagesController) NumberTextView(org.telegram.ui.Components.NumberTextView) ChatAttachAlert(org.telegram.ui.Components.ChatAttachAlert) InviteMembersBottomSheet(org.telegram.ui.Components.InviteMembersBottomSheet) Collections(java.util.Collections) RLottieDrawable(org.telegram.ui.Components.RLottieDrawable) InputStream(java.io.InputStream) ArrayList(java.util.ArrayList) SpannableString(android.text.SpannableString) ActionBarPopupWindow(org.telegram.ui.ActionBar.ActionBarPopupWindow) Rect(android.graphics.Rect) BackDrawable(org.telegram.ui.ActionBar.BackDrawable) AnimatedFileDrawable(org.telegram.ui.Components.AnimatedFileDrawable) Drawable(android.graphics.drawable.Drawable) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) MessageBackgroundDrawable(org.telegram.ui.Components.MessageBackgroundDrawable) BlurBehindDrawable(org.telegram.ui.Components.BlurBehindDrawable) MotionBackgroundDrawable(org.telegram.ui.Components.MotionBackgroundDrawable) RLottieDrawable(org.telegram.ui.Components.RLottieDrawable) ViewPager(androidx.viewpager.widget.ViewPager) AtomicBoolean(java.util.concurrent.atomic.AtomicBoolean) ChatActionCell(org.telegram.ui.Cells.ChatActionCell) LongSparseIntArray(org.telegram.messenger.support.LongSparseIntArray) SparseIntArray(android.util.SparseIntArray) UserObject(org.telegram.messenger.UserObject) TLObject(org.telegram.tgnet.TLObject) MessageObject(org.telegram.messenger.MessageObject) DialogObject(org.telegram.messenger.DialogObject) ChatObject(org.telegram.messenger.ChatObject) PorterDuffColorFilter(android.graphics.PorterDuffColorFilter) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ChatScrimPopupContainerLayout(org.telegram.ui.Components.ChatScrimPopupContainerLayout) Intent(android.content.Intent) AtomicReference(java.util.concurrent.atomic.AtomicReference) ReactionsContainerLayout(org.telegram.ui.Components.ReactionsContainerLayout) ChatMessageCell(org.telegram.ui.Cells.ChatMessageCell) Animator(android.animation.Animator) ChatListItemAnimator(androidx.recyclerview.widget.ChatListItemAnimator) ValueAnimator(android.animation.ValueAnimator) ObjectAnimator(android.animation.ObjectAnimator) Bulletin(org.telegram.ui.Components.Bulletin) SpannableStringBuilder(android.text.SpannableStringBuilder) ValueAnimator(android.animation.ValueAnimator) TLRPC(org.telegram.tgnet.TLRPC) PagerAdapter(androidx.viewpager.widget.PagerAdapter) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) TextView(android.widget.TextView) NumberTextView(org.telegram.ui.Components.NumberTextView) TranslateAlert(org.telegram.ui.Components.TranslateAlert) HorizontalScrollView(android.widget.HorizontalScrollView) ActionBarMenu(org.telegram.ui.ActionBar.ActionBarMenu) ReactedUsersListView(org.telegram.ui.Components.ReactedUsersListView) BottomSheet(org.telegram.ui.ActionBar.BottomSheet) ChatThemeBottomSheet(org.telegram.ui.Components.ChatThemeBottomSheet) EmbedBottomSheet(org.telegram.ui.Components.EmbedBottomSheet) InviteMembersBottomSheet(org.telegram.ui.Components.InviteMembersBottomSheet) SpannableStringBuilder(android.text.SpannableStringBuilder) ChatObject(org.telegram.messenger.ChatObject) AnimatorSet(android.animation.AnimatorSet) KeyEvent(android.view.KeyEvent) ActionBarMenuSubItem(org.telegram.ui.ActionBar.ActionBarMenuSubItem) VoIPService(org.telegram.messenger.voip.VoIPService) ViewGroup(android.view.ViewGroup) Bundle(android.os.Bundle) ReactedHeaderView(org.telegram.ui.Components.ReactedHeaderView) HorizontalScrollView(android.widget.HorizontalScrollView) PinnedLineView(org.telegram.ui.Components.PinnedLineView) BotCommandsMenuView(org.telegram.ui.Components.BotCommandsMenuView) ReactedHeaderView(org.telegram.ui.Components.ReactedHeaderView) PipRoundVideoView(org.telegram.ui.Components.PipRoundVideoView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) RecyclerView(androidx.recyclerview.widget.RecyclerView) BluredView(org.telegram.ui.Components.BluredView) InstantCameraView(org.telegram.ui.Components.InstantCameraView) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) ChatActivityEnterTopView(org.telegram.ui.Components.ChatActivityEnterTopView) ChatBigEmptyView(org.telegram.ui.Components.ChatBigEmptyView) BackupImageView(org.telegram.ui.Components.BackupImageView) TextureView(android.view.TextureView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ImageView(android.widget.ImageView) RadialProgressView(org.telegram.ui.Components.RadialProgressView) ChatGreetingsView(org.telegram.ui.Components.ChatGreetingsView) UndoView(org.telegram.ui.Components.UndoView) CounterView(org.telegram.ui.Components.CounterView) HintView(org.telegram.ui.Components.HintView) FragmentContextView(org.telegram.ui.Components.FragmentContextView) ClippingImageView(org.telegram.ui.Components.ClippingImageView) EmojiView(org.telegram.ui.Components.EmojiView) ChecksHintView(org.telegram.ui.Components.ChecksHintView) ThemeEditorView(org.telegram.ui.Components.ThemeEditorView) View(android.view.View) SearchCounterView(org.telegram.ui.Components.SearchCounterView) ForwardingPreviewView(org.telegram.ui.Components.ForwardingPreviewView) ReactionTabHolderView(org.telegram.ui.Components.ReactionTabHolderView) TextView(android.widget.TextView) ReactedUsersListView(org.telegram.ui.Components.ReactedUsersListView) NumberTextView(org.telegram.ui.Components.NumberTextView) Paint(android.graphics.Paint) TextSelectionHint(org.telegram.ui.Components.TextSelectionHint) TextPaint(android.text.TextPaint) SuppressLint(android.annotation.SuppressLint) ReactionTabHolderView(org.telegram.ui.Components.ReactionTabHolderView) MotionEvent(android.view.MotionEvent) SparseArray(android.util.SparseArray) LongSparseArray(androidx.collection.LongSparseArray) ChatBlurredFrameLayout(org.telegram.ui.Components.ChatBlurredFrameLayout) SizeNotifierFrameLayout(org.telegram.ui.Components.SizeNotifierFrameLayout) AspectRatioFrameLayout(com.google.android.exoplayer2.ui.AspectRatioFrameLayout) FrameLayout(android.widget.FrameLayout) MessageObject(org.telegram.messenger.MessageObject) LinearLayout(android.widget.LinearLayout)

Example 3 with ChatActionCell

use of org.telegram.ui.Cells.ChatActionCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class ChatActivity method updateChatListViewTopPadding.

private void updateChatListViewTopPadding() {
    if (!invalidateChatListViewTopPadding || chatListView == null || fixedKeyboardHeight > 0) {
        return;
    }
    float topPanelViewH = Math.max(0, AndroidUtilities.dp(48) + topChatPanelViewOffset);
    float pinnedViewH = 0;
    if (pinnedMessageView != null && pinnedMessageView.getVisibility() == View.VISIBLE) {
        pinnedViewH = Math.max(0, AndroidUtilities.dp(48) + pinnedMessageEnterOffset);
    }
    float pendingViewH = 0;
    View pendingRequestsView = pendingRequestsDelegate != null ? pendingRequestsDelegate.getView() : null;
    if (pendingRequestsView != null && pendingRequestsView.getVisibility() == View.VISIBLE) {
        pendingViewH = Math.max(0, pendingRequestsView.getHeight() + pendingRequestsDelegate.getViewEnterOffset());
    }
    float oldPadding = chatListViewPaddingTop;
    chatListViewPaddingTopOnlyTopViews = topPanelViewH + pinnedViewH;
    chatListViewPaddingTop = AndroidUtilities.dp(4) + contentPaddingTop + topPanelViewH + pinnedViewH + pendingViewH;
    chatListViewPaddingTop += blurredViewTopOffset;
    chatListViewPaddingVisibleOffset = 0;
    chatListViewPaddingTop += contentPanTranslation + bottomPanelTranslationY;
    if (bottomPanelTranslationY == 0 && !chatActivityEnterView.pannelAniamationInProgress() && (contentView.getLayoutParams().height < 0 || (contentView.getKeyboardHeight() <= AndroidUtilities.dp(20) && chatActivityEnterView.isPopupShowing()))) {
        chatListViewPaddingTop += contentView.getKeyboardHeight() <= AndroidUtilities.dp(20) && !AndroidUtilities.isInMultiwindow && !inBubbleMode ? chatActivityEnterView.getEmojiPadding() : contentView.getKeyboardHeight();
    }
    if (!inPreviewMode && chatActivityEnterView != null) {
        if (chatActivityEnterView.getAnimatedTop() != 0) {
            chatListViewPaddingTop += chatActivityEnterView.getHeightWithTopView() - AndroidUtilities.dp(51) - chatActivityEnterView.getAnimatedTop();
        } else if (!chatActivityEnterView.pannelAniamationInProgress()) {
            chatListViewPaddingTop += chatActivityEnterView.getHeightWithTopView() - AndroidUtilities.dp(51);
            if (chatActivityEnterView.currentTopViewAnimation == null) {
                chatListViewPaddingTop -= chatListView.getTranslationY();
            }
        }
    }
    if (infoTopView != null) {
        infoTopView.setTranslationY(chatListViewPaddingTop - AndroidUtilities.dp(30) + topViewOffset);
        chatListViewPaddingTop += topViewOffset;
        chatListViewPaddingVisibleOffset += topViewOffset;
    }
    if (floatingDateView != null) {
        floatingDateView.setTranslationY(chatListView.getTranslationY() + chatListViewPaddingTop + floatingDateViewOffset - AndroidUtilities.dp(4));
    }
    int p = chatListView.getMeasuredHeight() * 2 / 3;
    if (chatListView != null && chatLayoutManager != null && chatAdapter != null) {
        if (chatListView.getPaddingTop() != p) {
            int firstVisPos = chatLayoutManager.findFirstVisibleItemPosition();
            int lastVisPos = chatLayoutManager.findLastVisibleItemPosition();
            int top = 0;
            MessageObject scrollToMessageObject = null;
            if (firstVisPos != RecyclerView.NO_POSITION) {
                for (int i = firstVisPos; i <= lastVisPos; i++) {
                    View v = chatLayoutManager.findViewByPosition(i);
                    if (v instanceof ChatMessageCell) {
                        scrollToMessageObject = ((ChatMessageCell) v).getMessageObject();
                        top = chatListView.getMeasuredHeight() - v.getBottom() - chatListView.getPaddingBottom();
                        break;
                    } else if (v instanceof ChatActionCell) {
                        scrollToMessageObject = ((ChatActionCell) v).getMessageObject();
                        top = chatListView.getMeasuredHeight() - v.getBottom() - chatListView.getPaddingBottom();
                        break;
                    }
                }
            }
            chatListView.setPadding(0, p, 0, AndroidUtilities.dp(3) + blurredViewBottomOffset);
            if (firstVisPos != RecyclerView.NO_POSITION && scrollToMessageObject != null) {
                chatAdapter.updateRowsSafe();
                int index = messages.indexOf(scrollToMessageObject);
                if (index >= 0) {
                    chatLayoutManager.scrollToPositionWithOffset(chatAdapter.messagesStartRow + index, top);
                }
            }
            invalidateMessagesVisiblePart();
        }
        chatListView.setTopGlowOffset((int) (chatListViewPaddingTop - chatListViewPaddingVisibleOffset - AndroidUtilities.dp(4)));
        if (oldPadding != chatListViewPaddingTop) {
            int n = chatListView.getChildCount();
            for (int i = 0; i < n; i++) {
                View child = chatListView.getChildAt(i);
                int adapterPosition = chatListView.getChildAdapterPosition(child);
                if (adapterPosition == chatAdapter.getItemCount() - 1) {
                    float padding = chatListViewPaddingTop;
                    if (isThreadChat() && pinnedMessageView != null && pinnedMessageView.getVisibility() == View.VISIBLE) {
                        padding -= Math.max(0, AndroidUtilities.dp(48) + pinnedMessageEnterOffset);
                    }
                    if (child.getTop() > padding) {
                        chatListView.scrollBy(0, (int) (child.getTop() - padding));
                    }
                    break;
                }
            }
        }
        if (!isThreadChat() && !wasManualScroll && unreadMessageObject != null && chatListView != null) {
            chatListView.scrollBy(0, (int) (oldPadding - chatListViewPaddingTop));
        }
    }
    invalidateChatListViewTopPadding = false;
}
Also used : ChatActionCell(org.telegram.ui.Cells.ChatActionCell) ChatMessageCell(org.telegram.ui.Cells.ChatMessageCell) HorizontalScrollView(android.widget.HorizontalScrollView) PinnedLineView(org.telegram.ui.Components.PinnedLineView) BotCommandsMenuView(org.telegram.ui.Components.BotCommandsMenuView) ReactedHeaderView(org.telegram.ui.Components.ReactedHeaderView) PipRoundVideoView(org.telegram.ui.Components.PipRoundVideoView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) RecyclerView(androidx.recyclerview.widget.RecyclerView) BluredView(org.telegram.ui.Components.BluredView) InstantCameraView(org.telegram.ui.Components.InstantCameraView) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) ChatActivityEnterTopView(org.telegram.ui.Components.ChatActivityEnterTopView) ChatBigEmptyView(org.telegram.ui.Components.ChatBigEmptyView) BackupImageView(org.telegram.ui.Components.BackupImageView) TextureView(android.view.TextureView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ImageView(android.widget.ImageView) RadialProgressView(org.telegram.ui.Components.RadialProgressView) ChatGreetingsView(org.telegram.ui.Components.ChatGreetingsView) UndoView(org.telegram.ui.Components.UndoView) CounterView(org.telegram.ui.Components.CounterView) HintView(org.telegram.ui.Components.HintView) FragmentContextView(org.telegram.ui.Components.FragmentContextView) ClippingImageView(org.telegram.ui.Components.ClippingImageView) EmojiView(org.telegram.ui.Components.EmojiView) ChecksHintView(org.telegram.ui.Components.ChecksHintView) ThemeEditorView(org.telegram.ui.Components.ThemeEditorView) View(android.view.View) SearchCounterView(org.telegram.ui.Components.SearchCounterView) ForwardingPreviewView(org.telegram.ui.Components.ForwardingPreviewView) ReactionTabHolderView(org.telegram.ui.Components.ReactionTabHolderView) TextView(android.widget.TextView) ReactedUsersListView(org.telegram.ui.Components.ReactedUsersListView) NumberTextView(org.telegram.ui.Components.NumberTextView) MessageObject(org.telegram.messenger.MessageObject) Paint(android.graphics.Paint) TextSelectionHint(org.telegram.ui.Components.TextSelectionHint) TextPaint(android.text.TextPaint) SuppressLint(android.annotation.SuppressLint)

Example 4 with ChatActionCell

use of org.telegram.ui.Cells.ChatActionCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class ChatActivity method getThemeDescriptions.

@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
    if (isPauseOnThemePreview) {
        isPauseOnThemePreview = false;
        return null;
    }
    ThemeDescription.ThemeDescriptionDelegate selectedBackgroundDelegate = () -> {
        if (chatActivityEnterView != null) {
            chatActivityEnterView.updateColors();
        }
        Theme.refreshAttachButtonsColors();
        if (chatAttachAlert != null) {
            chatAttachAlert.checkColors();
        }
        if (chatListView != null) {
            int count = chatListView.getChildCount();
            for (int a = 0; a < count; a++) {
                View child = chatListView.getChildAt(a);
                if (child instanceof ChatMessageCell) {
                    ((ChatMessageCell) child).createSelectorDrawable(0);
                } else if (child instanceof ChatActionCell) {
                    ((ChatActionCell) child).setInvalidateColors(true);
                }
            }
        }
        if (messagesSearchListView != null) {
            int count = messagesSearchListView.getChildCount();
            for (int a = 0; a < count; a++) {
                View child = messagesSearchListView.getChildAt(a);
                if (child instanceof DialogCell) {
                    ((DialogCell) child).update(0);
                }
            }
        }
        if (scrimPopupWindowItems != null) {
            for (int a = 0; a < scrimPopupWindowItems.length; a++) {
                scrimPopupWindowItems[a].setColors(getThemedColor(Theme.key_actionBarDefaultSubmenuItem), getThemedColor(Theme.key_actionBarDefaultSubmenuItemIcon));
                scrimPopupWindowItems[a].setSelectorColor(getThemedColor(Theme.key_dialogButtonSelector));
            }
        }
        if (scrimPopupWindow != null) {
            final View contentView = scrimPopupWindow.getContentView();
            contentView.setBackgroundColor(getThemedColor(Theme.key_actionBarDefaultSubmenuBackground));
            contentView.invalidate();
        }
        if (instantCameraView != null) {
            instantCameraView.invalidateBlur();
        }
        if (pinnedLineView != null) {
            pinnedLineView.updateColors();
        }
        if (chatActivityEnterTopView != null && chatActivityEnterTopView.getEditView() != null) {
            chatActivityEnterTopView.getEditView().updateColors();
        }
        if (headerItem != null) {
            headerItem.updateColor();
        }
        setNavigationBarColor(getThemedColor(Theme.key_windowBackgroundGray));
        if (fragmentContextView != null) {
            fragmentContextView.updateColors();
        }
        if (avatarContainer != null) {
            avatarContainer.updateColors();
        }
        if (pinnedMessageView != null) {
            pinnedMessageView.backgroundColor = getThemedColor(Theme.key_chat_topPanelBackground);
        }
        if (topChatPanelView != null) {
            topChatPanelView.backgroundColor = getThemedColor(Theme.key_chat_topPanelBackground);
        }
    };
    ArrayList<ThemeDescription> themeDescriptions = new ArrayList<>();
    themeDescriptions.add(new ThemeDescription(fragmentView, 0, null, null, null, null, Theme.key_chat_wallpaper));
    themeDescriptions.add(new ThemeDescription(fragmentView, 0, null, null, null, null, Theme.key_chat_wallpaper_gradient_to1));
    themeDescriptions.add(new ThemeDescription(fragmentView, 0, null, null, null, null, Theme.key_chat_wallpaper_gradient_to2));
    themeDescriptions.add(new ThemeDescription(fragmentView, 0, null, null, null, null, Theme.key_chat_wallpaper_gradient_to3));
    themeDescriptions.add(new ThemeDescription(messagesSearchListView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
    if (reportType < 0) {
        themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault));
        themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultIcon));
        themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector));
        themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle));
        themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBTITLECOLOR, null, null, null, null, Theme.key_actionBarDefaultSubtitle));
    } else {
        themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefault));
        themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
        themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
        themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
        themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBTITLECOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
    }
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUBACKGROUND, null, null, null, selectedBackgroundDelegate, Theme.key_actionBarDefaultSubmenuBackground));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUITEM, null, null, null, selectedBackgroundDelegate, Theme.key_actionBarDefaultSubmenuItem));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SUBMENUITEM | ThemeDescription.FLAG_IMAGECOLOR, null, null, null, selectedBackgroundDelegate, Theme.key_actionBarDefaultSubmenuItemIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault));
    themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTitleTextView() : null, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_actionBarDefaultTitle));
    themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTitleTextView() : null, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_actionBarDefaultSubtitle));
    themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getSubtitleTextView() : null, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, null, new Paint[] { Theme.chat_statusPaint, Theme.chat_statusRecordPaint }, null, null, Theme.key_chat_status, null));
    themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getSubtitleTextView() : null, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, null, null, null, null, Theme.key_actionBarDefaultSubtitle, null));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCH, null, null, null, null, Theme.key_actionBarDefaultSearch));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_actionBarDefaultSearchPlaceholder));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_actionBarDefaultSearchPlaceholder));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_BACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefault));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_TOPBACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefaultTop));
    themeDescriptions.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
    themeDescriptions.add(new ThemeDescription(selectedMessagesCountTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
    themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTitleTextView() : null, 0, null, null, new Drawable[] { Theme.chat_muteIconDrawable }, null, Theme.key_chat_muteIcon));
    themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTitleTextView() : null, 0, null, null, new Drawable[] { Theme.chat_lockIconDrawable }, null, Theme.key_chat_lockIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundRed));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundOrange));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundViolet));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundGreen));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundCyan));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundBlue));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_backgroundPink));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageRed));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageOrange));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageViolet));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageGreen));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageCyan));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessageBlue));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_avatar_nameInMessagePink));
    Theme.MessageDrawable msgInDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgIn);
    Theme.MessageDrawable msgInMediaDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgInMedia);
    Theme.MessageDrawable msgInSelectedDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgInSelected);
    Theme.MessageDrawable msgInMediaSelectedDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgInMediaSelected);
    Theme.MessageDrawable msgOutDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgOut);
    Theme.MessageDrawable msgOutMediaDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgOutMedia);
    Theme.MessageDrawable msgOutSelectedDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgOutSelected);
    Theme.MessageDrawable msgOutMediaSelectedDrawable = (Theme.MessageDrawable) getThemedDrawable(Theme.key_drawable_msgOutMediaSelected);
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class, BotHelpCell.class }, null, new Drawable[] { msgInDrawable, msgInMediaDrawable }, null, Theme.key_chat_inBubble));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgInSelectedDrawable, msgInMediaSelectedDrawable }, null, Theme.key_chat_inBubbleSelected));
    if (msgInDrawable != null) {
        themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, msgInDrawable.getShadowDrawables(), null, Theme.key_chat_inBubbleShadow));
        themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, msgInMediaDrawable.getShadowDrawables(), null, Theme.key_chat_inBubbleShadow));
        themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, msgOutDrawable.getShadowDrawables(), null, Theme.key_chat_outBubbleShadow));
        themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, msgOutMediaDrawable.getShadowDrawables(), null, Theme.key_chat_outBubbleShadow));
    }
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutDrawable, msgOutMediaDrawable }, null, Theme.key_chat_outBubble));
    if (!themeDelegate.isThemeChangeAvailable()) {
        themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutDrawable, msgOutMediaDrawable }, null, Theme.key_chat_outBubbleGradient1));
        themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutDrawable, msgOutMediaDrawable }, null, Theme.key_chat_outBubbleGradient2));
        themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutDrawable, msgOutMediaDrawable }, null, Theme.key_chat_outBubbleGradient3));
    }
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutSelectedDrawable, msgOutMediaSelectedDrawable }, null, Theme.key_chat_outBubbleSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { msgOutSelectedDrawable, msgOutMediaSelectedDrawable }, null, Theme.key_chat_outBubbleGradientSelectedOverlay));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatActionCell.class }, getThemedPaint(Theme.key_paint_chatActionText), null, null, Theme.key_chat_serviceText));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_LINKCOLOR, new Class[] { ChatActionCell.class }, getThemedPaint(Theme.key_paint_chatActionText), null, null, Theme.key_chat_serviceLink));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_botCardDrawalbe, getThemedDrawable(Theme.key_drawable_shareIcon), getThemedDrawable(Theme.key_drawable_replyIcon), getThemedDrawable(Theme.key_drawable_botInline), getThemedDrawable(Theme.key_drawable_botLink), getThemedDrawable(Theme.key_drawable_goIcon), getThemedDrawable(Theme.key_drawable_commentSticker) }, null, Theme.key_chat_serviceIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class, ChatActionCell.class }, null, null, null, Theme.key_chat_serviceBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class, ChatActionCell.class }, null, null, null, Theme.key_chat_serviceBackgroundSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class, BotHelpCell.class }, null, null, null, Theme.key_chat_messageTextIn));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_messageTextOut));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_LINKCOLOR, new Class[] { ChatMessageCell.class, BotHelpCell.class }, null, null, null, Theme.key_chat_messageLinkIn, null));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_LINKCOLOR, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_messageLinkOut, null));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgNoSoundDrawable }, null, Theme.key_chat_mediaTimeText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCheck) }, null, Theme.key_chat_outSentCheck));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCheckSelected) }, null, Theme.key_chat_outSentCheckSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCheckRead), getThemedDrawable(Theme.key_drawable_msgOutHalfCheck) }, null, Theme.key_chat_outSentCheckRead));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCheckReadSelected), getThemedDrawable(Theme.key_drawable_msgOutHalfCheckSelected) }, null, Theme.key_chat_outSentCheckReadSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outSentClock));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outSentClockSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inSentClock));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inSentClockSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgMediaCheckDrawable, Theme.chat_msgMediaHalfCheckDrawable }, null, Theme.key_chat_mediaSentCheck));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgStickerHalfCheck), getThemedDrawable(Theme.key_drawable_msgStickerCheck), getThemedDrawable(Theme.key_drawable_msgStickerClock), getThemedDrawable(Theme.key_drawable_msgStickerViews), getThemedDrawable(Theme.key_drawable_msgStickerReplies), getThemedDrawable(Theme.key_drawable_msgStickerPinned) }, null, Theme.key_chat_serviceText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_mediaSentClock));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutViews), getThemedDrawable(Theme.key_drawable_msgOutReplies), getThemedDrawable(Theme.key_drawable_msgOutPinned) }, null, Theme.key_chat_outViews));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutViewsSelected), getThemedDrawable(Theme.key_drawable_msgOutRepliesSelected), getThemedDrawable(Theme.key_drawable_msgOutPinnedSelected) }, null, Theme.key_chat_outViewsSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgInViewsDrawable, Theme.chat_msgInRepliesDrawable, Theme.chat_msgInPinnedDrawable }, null, Theme.key_chat_inViews));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgInViewsSelectedDrawable, Theme.chat_msgInRepliesSelectedDrawable, Theme.chat_msgInPinnedSelectedDrawable }, null, Theme.key_chat_inViewsSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgMediaViewsDrawable, Theme.chat_msgMediaRepliesDrawable, Theme.chat_msgMediaPinnedDrawable }, null, Theme.key_chat_mediaViews));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutMenu) }, null, Theme.key_chat_outMenu));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutMenuSelected) }, null, Theme.key_chat_outMenuSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgInMenuDrawable }, null, Theme.key_chat_inMenu));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgInMenuSelectedDrawable }, null, Theme.key_chat_inMenuSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgMediaMenuDrawable }, null, Theme.key_chat_mediaMenu));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutInstant) }, null, Theme.key_chat_outInstant));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgInInstantDrawable, Theme.chat_commentDrawable, Theme.chat_commentArrowDrawable }, null, Theme.key_chat_inInstant));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCallAudio), getThemedDrawable(Theme.key_drawable_msgOutCallVideo) }, null, Theme.key_chat_outInstant));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { getThemedDrawable(Theme.key_drawable_msgOutCallAudioSelected), getThemedDrawable(Theme.key_drawable_msgOutCallVideoSelected) }, null, Theme.key_chat_outInstant));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, Theme.chat_msgInCallDrawable, null, Theme.key_chat_inInstant));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, Theme.chat_msgInCallSelectedDrawable, null, Theme.key_chat_inInstantSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgCallUpGreenDrawable }, null, Theme.key_chat_outGreenCall));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgCallDownRedDrawable }, null, Theme.key_chat_inRedCall));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgCallDownGreenDrawable }, null, Theme.key_chat_inGreenCall));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_msgErrorPaint, null, null, Theme.key_chat_sentError));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_msgErrorDrawable }, null, Theme.key_chat_sentErrorIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, selectedBackgroundDelegate, Theme.key_chat_selectedBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_durationPaint, null, null, Theme.key_chat_previewDurationText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_gamePaint, null, null, Theme.key_chat_previewGameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPreviewInstantText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPreviewInstantText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPreviewInstantSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPreviewInstantSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_deleteProgressPaint, null, null, Theme.key_chat_secretTimeText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_stickerNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, getThemedPaint(Theme.key_paint_chatBotButton), null, null, Theme.key_chat_botButtonText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_botProgressPaint, null, null, Theme.key_chat_botProgress));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, getThemedPaint(Theme.key_paint_chatTimeBackground), null, null, Theme.key_chat_mediaTimeBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inForwardedNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outForwardedNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPsaNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPsaNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inViaBotNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outViaBotNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_stickerViaBotNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inReplyLine));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outReplyLine));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_stickerReplyLine));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inReplyNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outReplyNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_stickerReplyNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inReplyMessageText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outReplyMessageText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inReplyMediaMessageText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outReplyMediaMessageText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inReplyMediaMessageSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outReplyMediaMessageSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_stickerReplyMessageText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPreviewLine));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPreviewLine));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inSiteNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outSiteNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inContactNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outContactNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inContactPhoneText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inContactPhoneSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outContactPhoneText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outContactPhoneSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_mediaProgress));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioProgress));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioProgress));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioSelectedProgress));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioSelectedProgress));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_mediaTimeText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inTimeText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outTimeText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inTimeSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAdminText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAdminSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAdminText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAdminSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outTimeSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioPerformerText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioPerformerSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioPerformerText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioPerformerSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioTitleText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioTitleText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioDurationText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioDurationText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioDurationSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioDurationSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioSeekbar));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioSeekbar));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioSeekbarSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioSeekbarSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioSeekbarFill));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inAudioCacheSeekbar));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioSeekbarFill));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outAudioCacheSeekbar));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inVoiceSeekbar));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outVoiceSeekbar));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inVoiceSeekbarSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outVoiceSeekbarSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inVoiceSeekbarFill));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outVoiceSeekbarFill));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileProgress));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileProgress));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileProgressSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileProgressSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileNameText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileInfoText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileInfoText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileInfoSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileInfoSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inFileBackgroundSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outFileBackgroundSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inVenueInfoText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outVenueInfoText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inVenueInfoSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outVenueInfoSelectedText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_mediaInfoText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_urlPaint, null, null, Theme.key_chat_linkSelectBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, Theme.chat_textSearchSelectionPaint, null, null, Theme.key_chat_textSelectBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outLoader));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outMediaIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outLoaderSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outMediaIconSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inLoader));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inMediaIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inLoaderSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inMediaIconSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[0][0], Theme.chat_photoStatesDrawables[1][0], Theme.chat_photoStatesDrawables[2][0], Theme.chat_photoStatesDrawables[3][0] }, null, Theme.key_chat_mediaLoaderPhoto));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[0][0], Theme.chat_photoStatesDrawables[1][0], Theme.chat_photoStatesDrawables[2][0], Theme.chat_photoStatesDrawables[3][0] }, null, Theme.key_chat_mediaLoaderPhotoIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[0][1], Theme.chat_photoStatesDrawables[1][1], Theme.chat_photoStatesDrawables[2][1], Theme.chat_photoStatesDrawables[3][1] }, null, Theme.key_chat_mediaLoaderPhotoSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[0][1], Theme.chat_photoStatesDrawables[1][1], Theme.chat_photoStatesDrawables[2][1], Theme.chat_photoStatesDrawables[3][1] }, null, Theme.key_chat_mediaLoaderPhotoIconSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[7][0], Theme.chat_photoStatesDrawables[8][0] }, null, Theme.key_chat_outLoaderPhoto));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[7][0], Theme.chat_photoStatesDrawables[8][0] }, null, Theme.key_chat_outLoaderPhotoIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[7][1], Theme.chat_photoStatesDrawables[8][1] }, null, Theme.key_chat_outLoaderPhotoSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[7][1], Theme.chat_photoStatesDrawables[8][1] }, null, Theme.key_chat_outLoaderPhotoIconSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[10][0], Theme.chat_photoStatesDrawables[11][0] }, null, Theme.key_chat_inLoaderPhoto));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[10][0], Theme.chat_photoStatesDrawables[11][0] }, null, Theme.key_chat_inLoaderPhotoIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[10][1], Theme.chat_photoStatesDrawables[11][1] }, null, Theme.key_chat_inLoaderPhotoSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[10][1], Theme.chat_photoStatesDrawables[11][1] }, null, Theme.key_chat_inLoaderPhotoIconSelected));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[9][0] }, null, Theme.key_chat_outFileIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[9][1] }, null, Theme.key_chat_outFileSelectedIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[12][0] }, null, Theme.key_chat_inFileIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_photoStatesDrawables[12][1] }, null, Theme.key_chat_inFileSelectedIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_contactDrawable[0] }, null, Theme.key_chat_inContactBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_contactDrawable[0] }, null, Theme.key_chat_inContactIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_contactDrawable[1] }, null, Theme.key_chat_outContactBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_contactDrawable[1] }, null, Theme.key_chat_outContactIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inLocationBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_locationDrawable[0] }, null, Theme.key_chat_inLocationIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outLocationBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_locationDrawable[1] }, null, Theme.key_chat_outLocationIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPollCorrectAnswer));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPollCorrectAnswer));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_inPollWrongAnswer));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, null, null, Theme.key_chat_outPollWrongAnswer));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_pollHintDrawable[0] }, null, Theme.key_chat_inPreviewInstantText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_pollHintDrawable[1] }, null, Theme.key_chat_outPreviewInstantText));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_psaHelpDrawable[0] }, null, Theme.key_chat_inViews));
    themeDescriptions.add(new ThemeDescription(chatListView, 0, new Class[] { ChatMessageCell.class }, null, new Drawable[] { Theme.chat_psaHelpDrawable[1] }, null, Theme.key_chat_outViews));
    if (!themeDelegate.isThemeChangeAvailable()) {
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, Theme.dialogs_countPaint, null, null, Theme.key_chats_unreadCounter));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Paint[] { Theme.dialogs_namePaint[0], Theme.dialogs_namePaint[1], Theme.dialogs_searchNamePaint }, null, null, Theme.key_chats_name));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Paint[] { Theme.dialogs_nameEncryptedPaint[0], Theme.dialogs_nameEncryptedPaint[1], Theme.dialogs_searchNameEncryptedPaint }, null, null, Theme.key_chats_secretName));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_lockDrawable }, null, Theme.key_chats_secretIcon));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_groupDrawable, Theme.dialogs_broadcastDrawable, Theme.dialogs_botDrawable }, null, Theme.key_chats_nameIcon));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_scamDrawable, Theme.dialogs_fakeDrawable }, null, Theme.key_chats_draft));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, Theme.dialogs_messagePaint[1], null, null, Theme.key_chats_message_threeLines));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, Theme.dialogs_messageNamePaint, null, null, Theme.key_chats_nameMessage_threeLines));
        themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chats_nameMessage));
        themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chats_attachMessage));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, Theme.dialogs_messagePrintingPaint, null, null, Theme.key_chats_actionMessage));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, Theme.dialogs_timePaint, null, null, Theme.key_chats_date));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_checkDrawable }, null, Theme.key_chats_sentCheck));
        themeDescriptions.add(new ThemeDescription(messagesSearchListView, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_checkReadDrawable, Theme.dialogs_halfCheckDrawable }, null, Theme.key_chats_sentReadCheck));
    }
    themeDescriptions.add(new ThemeDescription(mentionContainer, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
    themeDescriptions.add(new ThemeDescription(mentionContainer, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
    themeDescriptions.add(new ThemeDescription(mentionContainer, 0, null, null, new Drawable[] { Theme.chat_composeShadowRoundDrawable }, null, Theme.key_chat_messagePanelBackground));
    themeDescriptions.add(new ThemeDescription(searchContainer, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
    themeDescriptions.add(new ThemeDescription(searchContainer, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
    themeDescriptions.add(new ThemeDescription(bottomOverlay, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
    themeDescriptions.add(new ThemeDescription(bottomOverlay, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
    themeDescriptions.add(new ThemeDescription(bottomOverlayChat, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
    themeDescriptions.add(new ThemeDescription(bottomOverlayChat, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
    themeDescriptions.add(new ThemeDescription(bottomMessagesActionContainer, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
    themeDescriptions.add(new ThemeDescription(bottomMessagesActionContainer, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, getThemedPaint(Theme.key_paint_chatComposeBackground), null, null, Theme.key_chat_messagePanelBackground));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelText));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_CURSORCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelCursor));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_HINTTEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelHint));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "sendButton" }, null, null, null, Theme.key_chat_messagePanelSend));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "sendButton" }, null, null, 24, null, Theme.key_chat_messagePanelSend));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "botButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "botButton" }, null, null, null, Theme.key_listSelector));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "notifyButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_IMAGECOLOR | ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatActivityEnterView.class }, new String[] { "scheduledButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "scheduledButton" }, null, null, null, Theme.key_chat_recordedVoiceDot));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "scheduledButton" }, null, null, null, Theme.key_listSelector));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "attachButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "attachButton" }, null, null, null, Theme.key_listSelector));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "audioSendButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "videoSendButton" }, null, null, null, Theme.key_chat_messagePanelIcons));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "notifyButton" }, null, null, null, Theme.key_chat_messagePanelVideoFrame));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "notifyButton" }, null, null, null, Theme.key_listSelector));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "videoTimelineView" }, null, null, null, Theme.key_chat_messagePanelSend));
    // themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_IMAGECOLOR, new Class[]{ChatActivityEnterView.class}, new String[]{"doneButtonImage"}, null, null, null, Theme.key_chat_messagePanelBackground));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "micDrawable" }, null, null, null, Theme.key_chat_messagePanelVoicePressed));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "cameraDrawable" }, null, null, null, Theme.key_chat_messagePanelVoicePressed));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "sendDrawable" }, null, null, null, Theme.key_chat_messagePanelVoicePressed));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, null, null, null, Theme.key_chat_messagePanelVoiceLock));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, null, null, null, Theme.key_chat_messagePanelVoiceLockBackground));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "lockShadowDrawable" }, null, null, null, Theme.key_chat_messagePanelVoiceLockShadow));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "recordDeleteImageView" }, null, null, null, Theme.key_listSelector));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ChatActivityEnterView.class }, new String[] { "recordedAudioBackground" }, null, null, null, Theme.key_chat_recordedVoiceBackground));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, null, null, null, Theme.key_chat_recordTime));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, null, null, null, Theme.key_chat_recordVoiceCancel));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "recordedAudioTimeTextView" }, null, null, null, Theme.key_chat_messagePanelVoiceDuration));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, null, null, null, null, Theme.key_chat_recordVoiceCancel));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "doneButtonProgress" }, null, null, null, Theme.key_contextProgressInner1));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "doneButtonProgress" }, null, null, null, Theme.key_contextProgressOuter1));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "cancelBotButton" }, null, null, null, Theme.key_chat_messagePanelCancelInlineBot));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { ChatActivityEnterView.class }, new String[] { "cancelBotButton" }, null, null, null, Theme.key_listSelector));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "redDotPaint" }, null, null, null, Theme.key_chat_recordedVoiceDot));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "paint" }, null, null, null, Theme.key_chat_messagePanelVoiceBackground));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "seekBarWaveform" }, null, null, null, Theme.key_chat_recordedVoiceProgress));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "seekBarWaveform" }, null, null, null, Theme.key_chat_recordedVoiceProgressInner));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, new String[] { "dotPaint" }, null, null, null, Theme.key_chat_emojiPanelNewTrending));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView, 0, new Class[] { ChatActivityEnterView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_recordedVoicePlayPause));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelBackground));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelShadowLine));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelEmptyText));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelIcon));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelIconSelected));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelStickerPackSelector));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelBackspace));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelTrendingTitle));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelTrendingDescription));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelBadgeText));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelBadgeBackground));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiBottomPanelIcon));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiSearchIcon));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelStickerSetNameHighlight));
    themeDescriptions.add(new ThemeDescription(chatActivityEnterView != null ? chatActivityEnterView.getEmojiView() : null, 0, new Class[] { EmojiView.class }, null, null, null, selectedBackgroundDelegate, Theme.key_chat_emojiPanelStickerPackSelectorLine));
    if (chatActivityEnterView != null) {
        final TrendingStickersAlert trendingStickersAlert = chatActivityEnterView.getTrendingStickersAlert();
        if (trendingStickersAlert != null) {
            themeDescriptions.addAll(trendingStickersAlert.getThemeDescriptions());
        }
        themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, new Drawable[] { chatActivityEnterView.getStickersArrowDrawable() }, null, Theme.key_chat_messagePanelIcons));
    }
    for (int a = 0; a < 2; a++) {
        UndoView v = a == 0 ? undoView : topUndoView;
        themeDescriptions.add(new ThemeDescription(v, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_undo_background));
        themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "undoImageView" }, null, null, null, Theme.key_undo_cancelColor));
        themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "undoTextView" }, null, null, null, Theme.key_undo_cancelColor));
        themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "infoTextView" }, null, null, null, Theme.key_undo_infoColor));
        themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "subinfoTextView" }, null, null, null, Theme.key_undo_infoColor));
        themeDescriptions.add(new ThemeDescription(v, ThemeDescription.FLAG_LINKCOLOR, new Class[] { UndoView.class }, new String[] { "subinfoTextView" }, null, null, null, Theme.key_undo_cancelColor));
        themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "textPaint" }, null, null, null, Theme.key_undo_infoColor));
        themeDescriptions.add(new ThemeDescription(v, 0, new Class[] { UndoView.class }, new String[] { "progressPaint" }, null, null, null, Theme.key_undo_infoColor));
        themeDescriptions.add(new ThemeDescription(v, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { UndoView.class }, new String[] { "leftImageView" }, null, null, null, Theme.key_undo_infoColor));
    }
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_botKeyboardButtonText));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_botKeyboardButtonBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_botKeyboardButtonBackgroundPressed));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_inappPlayerBackground));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "playButton" }, null, null, null, Theme.key_inappPlayerPlayPause));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerTitle));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerPerformer));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_FASTSCROLL, new Class[] { FragmentContextView.class }, new String[] { "subtitleTextView" }, null, null, null, Theme.key_inappPlayerClose));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "closeButton" }, null, null, null, Theme.key_inappPlayerClose));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_returnToCallBackground));
    themeDescriptions.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_returnToCallText));
    themeDescriptions.add(new ThemeDescription(pinnedLineView, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_topPanelLine));
    themeDescriptions.add(new ThemeDescription(pinnedLineView, 0, null, null, null, selectedBackgroundDelegate, Theme.key_windowBackgroundWhite));
    themeDescriptions.add(new ThemeDescription(pinnedCounterTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_topPanelTitle));
    for (int a = 0; a < 2; a++) {
        themeDescriptions.add(new ThemeDescription(pinnedNameTextView[a], ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_topPanelTitle));
        themeDescriptions.add(new ThemeDescription(pinnedMessageTextView[a], ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_topPanelMessage));
    }
    themeDescriptions.add(new ThemeDescription(alertNameTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_topPanelTitle));
    themeDescriptions.add(new ThemeDescription(alertTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_topPanelMessage));
    themeDescriptions.add(new ThemeDescription(closePinned, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_topPanelClose));
    themeDescriptions.add(new ThemeDescription(pinnedListButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_topPanelClose));
    themeDescriptions.add(new ThemeDescription(closeReportSpam, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_topPanelClose));
    themeDescriptions.add(new ThemeDescription(topChatPanelView, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_topPanelBackground));
    themeDescriptions.add(new ThemeDescription(alertView, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_topPanelBackground));
    themeDescriptions.add(new ThemeDescription(pinnedMessageView, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_topPanelBackground));
    themeDescriptions.add(new ThemeDescription(addToContactsButton, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_addContact));
    themeDescriptions.add(new ThemeDescription(reportSpamButton, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, null, null, null, null, Theme.key_chat_reportSpam));
    themeDescriptions.add(new ThemeDescription(reportSpamButton, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, null, null, null, null, Theme.key_chat_addContact));
    themeDescriptions.add(new ThemeDescription(replyLineView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_chat_replyPanelLine));
    themeDescriptions.add(new ThemeDescription(replyNameTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_replyPanelName));
    themeDescriptions.add(new ThemeDescription(replyObjectTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText));
    themeDescriptions.add(new ThemeDescription(replyObjectHintTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_windowBackgroundWhiteGrayText));
    themeDescriptions.add(new ThemeDescription(replyIconImageView, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_replyPanelIcons));
    themeDescriptions.add(new ThemeDescription(replyCloseImageView, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_replyPanelClose));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_replyPanelName));
    themeDescriptions.add(new ThemeDescription(searchUpButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_searchPanelIcons));
    themeDescriptions.add(new ThemeDescription(searchUpButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
    themeDescriptions.add(new ThemeDescription(searchDownButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_searchPanelIcons));
    themeDescriptions.add(new ThemeDescription(searchDownButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
    themeDescriptions.add(new ThemeDescription(searchCalendarButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_searchPanelIcons));
    themeDescriptions.add(new ThemeDescription(searchCalendarButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
    themeDescriptions.add(new ThemeDescription(searchUserButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_searchPanelIcons));
    themeDescriptions.add(new ThemeDescription(searchUserButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
    themeDescriptions.add(new ThemeDescription(searchCountText, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_searchPanelText));
    themeDescriptions.add(new ThemeDescription(searchAsListTogglerView, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
    themeDescriptions.add(new ThemeDescription(replyButton, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
    themeDescriptions.add(new ThemeDescription(replyButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
    themeDescriptions.add(new ThemeDescription(forwardButton, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
    themeDescriptions.add(new ThemeDescription(forwardButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
    themeDescriptions.add(new ThemeDescription(bottomOverlayText, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_secretChatStatusText));
    themeDescriptions.add(new ThemeDescription(bottomOverlayChatText, 0, null, null, null, null, Theme.key_chat_fieldOverlayText));
    themeDescriptions.add(new ThemeDescription(bottomOverlayChatText, 0, null, null, null, null, Theme.key_chat_goDownButtonCounterBackground));
    themeDescriptions.add(new ThemeDescription(bottomOverlayChatText, 0, null, null, null, null, Theme.key_chat_messagePanelBackground));
    themeDescriptions.add(new ThemeDescription(bottomOverlayProgress, 0, null, null, null, null, Theme.key_chat_fieldOverlayText));
    themeDescriptions.add(new ThemeDescription(bottomOverlayImage, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_fieldOverlayText));
    themeDescriptions.add(new ThemeDescription(bigEmptyView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_serviceText));
    themeDescriptions.add(new ThemeDescription(emptyView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_serviceText));
    themeDescriptions.add(new ThemeDescription(progressBar, ThemeDescription.FLAG_PROGRESSBAR, null, null, null, null, Theme.key_chat_serviceText));
    themeDescriptions.add(new ThemeDescription(stickersPanelArrow, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_stickersHintPanel));
    themeDescriptions.add(new ThemeDescription(stickersListView, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { StickerCell.class }, null, null, null, Theme.key_chat_stickersHintPanel));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_USEBACKGROUNDDRAWABLE, new Class[] { ChatUnreadCell.class }, new String[] { "backgroundLayout" }, null, null, null, Theme.key_chat_unreadMessagesStartBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { ChatUnreadCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_chat_unreadMessagesStartArrowIcon));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatUnreadCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_unreadMessagesStartText));
    themeDescriptions.add(new ThemeDescription(progressView2, ThemeDescription.FLAG_SERVICEBACKGROUND, null, null, null, null, Theme.key_chat_serviceBackground));
    themeDescriptions.add(new ThemeDescription(emptyView, ThemeDescription.FLAG_SERVICEBACKGROUND, null, null, null, null, Theme.key_chat_serviceBackground));
    themeDescriptions.add(new ThemeDescription(bigEmptyView, ThemeDescription.FLAG_SERVICEBACKGROUND, null, null, null, null, Theme.key_chat_serviceBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_SERVICEBACKGROUND, new Class[] { ChatLoadingCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_serviceBackground));
    themeDescriptions.add(new ThemeDescription(chatListView, ThemeDescription.FLAG_PROGRESSBAR, new Class[] { ChatLoadingCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_serviceText));
    themeDescriptions.add(new ThemeDescription(mentionListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { BotSwitchCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_botSwitchToInlineText));
    themeDescriptions.add(new ThemeDescription(mentionListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { MentionCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(mentionListView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { MentionCell.class }, new String[] { "usernameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText3));
    themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, new Drawable[] { Theme.chat_inlineResultFile, Theme.chat_inlineResultAudio, Theme.chat_inlineResultLocation }, null, Theme.key_chat_inlineResultIcon));
    themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_windowBackgroundWhiteGrayText2));
    themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_windowBackgroundWhiteLinkText));
    themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
    themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_chat_inAudioProgress));
    themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_chat_inAudioSelectedProgress));
    themeDescriptions.add(new ThemeDescription(mentionListView, 0, new Class[] { ContextLinkCell.class }, null, null, null, Theme.key_divider));
    themeDescriptions.add(new ThemeDescription(gifHintTextView, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_gifSaveHintBackground));
    themeDescriptions.add(new ThemeDescription(gifHintTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_gifSaveHintText));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachMediaBanBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachMediaBanText));
    themeDescriptions.add(new ThemeDescription(noSoundHintView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HintView.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_gifSaveHintText));
    themeDescriptions.add(new ThemeDescription(noSoundHintView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { HintView.class }, new String[] { "imageView" }, null, null, null, Theme.key_chat_gifSaveHintText));
    themeDescriptions.add(new ThemeDescription(noSoundHintView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HintView.class }, new String[] { "arrowImageView" }, null, null, null, Theme.key_chat_gifSaveHintBackground));
    themeDescriptions.add(new ThemeDescription(forwardHintView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HintView.class }, new String[] { "textView" }, null, null, null, Theme.key_chat_gifSaveHintText));
    themeDescriptions.add(new ThemeDescription(forwardHintView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HintView.class }, new String[] { "arrowImageView" }, null, null, null, Theme.key_chat_gifSaveHintBackground));
    themeDescriptions.add(new ThemeDescription(pagedownButtonCounter, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_goDownButtonCounterBackground));
    themeDescriptions.add(new ThemeDescription(pagedownButtonCounter, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_goDownButtonCounter));
    themeDescriptions.add(new ThemeDescription(pagedownButtonImage, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_goDownButton));
    themeDescriptions.add(new ThemeDescription(pagedownButtonImage, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_chat_goDownButtonShadow));
    themeDescriptions.add(new ThemeDescription(pagedownButtonImage, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_goDownButtonIcon));
    themeDescriptions.add(new ThemeDescription(mentiondownButtonCounter, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_goDownButtonCounterBackground));
    themeDescriptions.add(new ThemeDescription(mentiondownButtonCounter, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_chat_goDownButtonCounter));
    themeDescriptions.add(new ThemeDescription(mentiondownButtonImage, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chat_goDownButton));
    themeDescriptions.add(new ThemeDescription(mentiondownButtonImage, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_chat_goDownButtonShadow));
    themeDescriptions.add(new ThemeDescription(mentiondownButtonImage, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chat_goDownButtonIcon));
    themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTimeItem() : null, 0, null, null, null, null, Theme.key_chat_secretTimerBackground));
    themeDescriptions.add(new ThemeDescription(avatarContainer != null ? avatarContainer.getTimeItem() : null, 0, null, null, null, null, Theme.key_chat_secretTimerText));
    themeDescriptions.add(new ThemeDescription(floatingDateView, 0, null, null, null, null, Theme.key_chat_serviceText));
    themeDescriptions.add(new ThemeDescription(floatingDateView, 0, null, null, null, null, Theme.key_chat_serviceBackground));
    themeDescriptions.add(new ThemeDescription(infoTopView, 0, null, null, null, null, Theme.key_chat_serviceText));
    themeDescriptions.add(new ThemeDescription(infoTopView, 0, null, null, null, null, Theme.key_chat_serviceBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachGalleryIcon));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachGalleryBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachGalleryText));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachAudioIcon));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachAudioBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachAudioText));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachFileIcon));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachFileBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachFileText));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachContactIcon));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachContactBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachContactText));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachLocationIcon));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachLocationBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachLocationText));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachPollIcon));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachPollBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachPollText));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, new Drawable[] { Theme.chat_attachEmptyDrawable }, null, Theme.key_chat_attachEmptyImage));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_attachPhotoBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogBackgroundGray));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogTextGray2));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogScrollGlow));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogGrayLine));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogCameraIcon));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_dialogButtonSelector));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_windowBackgroundWhiteLinkSelection));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_windowBackgroundWhiteInputField));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_outTextSelectionHighlight));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_inTextSelectionHighlight));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_TextSelectionCursor));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayGreen1));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayGreen2));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayBlue1));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayBlue2));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGreen1));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGreen2));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelBlue1));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelBlue2));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGray));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientMuted));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientMuted2));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientUnmuted));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientUnmuted2));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient2));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient3));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertMutedByAdmin));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertMutedByAdmin2));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_windowBackgroundGray));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_outReactionButtonBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_inReactionButtonBackground));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_inReactionButtonText));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_outReactionButtonText));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_inReactionButtonTextSelected));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_chat_inReactionButtonTextSelected));
    themeDescriptions.add(new ThemeDescription(null, 0, null, null, null, selectedBackgroundDelegate, Theme.key_chat_BlurAlpha));
    if (chatActivityEnterView != null) {
        themeDescriptions.add(new ThemeDescription(chatActivityEnterView.botCommandsMenuContainer.listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { BotCommandsMenuView.BotCommandView.class }, new String[] { "description" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
        themeDescriptions.add(new ThemeDescription(chatActivityEnterView.botCommandsMenuContainer.listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { BotCommandsMenuView.BotCommandView.class }, new String[] { "command" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText));
    }
    if (pendingRequestsDelegate != null) {
        pendingRequestsDelegate.fillThemeDescriptions(themeDescriptions);
    }
    for (ThemeDescription description : themeDescriptions) {
        description.resourcesProvider = themeDelegate;
    }
    return themeDescriptions;
}
Also used : ArrayList(java.util.ArrayList) ChatUnreadCell(org.telegram.ui.Cells.ChatUnreadCell) SpannableString(android.text.SpannableString) DialogCell(org.telegram.ui.Cells.DialogCell) StickerCell(org.telegram.ui.Cells.StickerCell) UndoView(org.telegram.ui.Components.UndoView) BotHelpCell(org.telegram.ui.Cells.BotHelpCell) EmojiView(org.telegram.ui.Components.EmojiView) ChatLoadingCell(org.telegram.ui.Cells.ChatLoadingCell) TrendingStickersAlert(org.telegram.ui.Components.TrendingStickersAlert) ContextLinkCell(org.telegram.ui.Cells.ContextLinkCell) BackDrawable(org.telegram.ui.ActionBar.BackDrawable) AnimatedFileDrawable(org.telegram.ui.Components.AnimatedFileDrawable) Drawable(android.graphics.drawable.Drawable) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) MessageBackgroundDrawable(org.telegram.ui.Components.MessageBackgroundDrawable) BlurBehindDrawable(org.telegram.ui.Components.BlurBehindDrawable) MotionBackgroundDrawable(org.telegram.ui.Components.MotionBackgroundDrawable) RLottieDrawable(org.telegram.ui.Components.RLottieDrawable) Paint(android.graphics.Paint) TextPaint(android.text.TextPaint) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) HorizontalScrollView(android.widget.HorizontalScrollView) PinnedLineView(org.telegram.ui.Components.PinnedLineView) BotCommandsMenuView(org.telegram.ui.Components.BotCommandsMenuView) ReactedHeaderView(org.telegram.ui.Components.ReactedHeaderView) PipRoundVideoView(org.telegram.ui.Components.PipRoundVideoView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) RecyclerView(androidx.recyclerview.widget.RecyclerView) BluredView(org.telegram.ui.Components.BluredView) InstantCameraView(org.telegram.ui.Components.InstantCameraView) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) ChatActivityEnterTopView(org.telegram.ui.Components.ChatActivityEnterTopView) ChatBigEmptyView(org.telegram.ui.Components.ChatBigEmptyView) BackupImageView(org.telegram.ui.Components.BackupImageView) TextureView(android.view.TextureView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ImageView(android.widget.ImageView) RadialProgressView(org.telegram.ui.Components.RadialProgressView) ChatGreetingsView(org.telegram.ui.Components.ChatGreetingsView) UndoView(org.telegram.ui.Components.UndoView) CounterView(org.telegram.ui.Components.CounterView) HintView(org.telegram.ui.Components.HintView) FragmentContextView(org.telegram.ui.Components.FragmentContextView) ClippingImageView(org.telegram.ui.Components.ClippingImageView) EmojiView(org.telegram.ui.Components.EmojiView) ChecksHintView(org.telegram.ui.Components.ChecksHintView) ThemeEditorView(org.telegram.ui.Components.ThemeEditorView) View(android.view.View) SearchCounterView(org.telegram.ui.Components.SearchCounterView) ForwardingPreviewView(org.telegram.ui.Components.ForwardingPreviewView) ReactionTabHolderView(org.telegram.ui.Components.ReactionTabHolderView) TextView(android.widget.TextView) ReactedUsersListView(org.telegram.ui.Components.ReactedUsersListView) NumberTextView(org.telegram.ui.Components.NumberTextView) Paint(android.graphics.Paint) TextSelectionHint(org.telegram.ui.Components.TextSelectionHint) TextPaint(android.text.TextPaint) SuppressLint(android.annotation.SuppressLint) HintView(org.telegram.ui.Components.HintView) ChecksHintView(org.telegram.ui.Components.ChecksHintView) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) ChatActionCell(org.telegram.ui.Cells.ChatActionCell) ChatMessageCell(org.telegram.ui.Cells.ChatMessageCell) MentionCell(org.telegram.ui.Cells.MentionCell) FragmentContextView(org.telegram.ui.Components.FragmentContextView) Theme(org.telegram.ui.ActionBar.Theme) BotSwitchCell(org.telegram.ui.Cells.BotSwitchCell)

Example 5 with ChatActionCell

use of org.telegram.ui.Cells.ChatActionCell in project Telegram-FOSS by Telegram-FOSS-Team.

the class ChatActivity method getPlaceForPhoto.

private PhotoViewer.PlaceProviderObject getPlaceForPhoto(MessageObject messageObject, TLRPC.FileLocation fileLocation, boolean needPreview, boolean onlyIfVisible) {
    int count = chatListView.getChildCount();
    for (int a = 0; a < count; a++) {
        ImageReceiver imageReceiver = null;
        View view = chatListView.getChildAt(a);
        if (view instanceof ChatMessageCell) {
            if (messageObject != null) {
                ChatMessageCell cell = (ChatMessageCell) view;
                MessageObject message = cell.getMessageObject();
                if (message != null && message.getId() == messageObject.getId()) {
                    imageReceiver = cell.getPhotoImage();
                }
            }
        } else if (view instanceof ChatActionCell) {
            ChatActionCell cell = (ChatActionCell) view;
            MessageObject message = cell.getMessageObject();
            if (message != null) {
                if (messageObject != null) {
                    if (message.getId() == messageObject.getId()) {
                        imageReceiver = cell.getPhotoImage();
                    }
                } else if (fileLocation != null && message.photoThumbs != null) {
                    for (int b = 0; b < message.photoThumbs.size(); b++) {
                        TLRPC.PhotoSize photoSize = message.photoThumbs.get(b);
                        if (photoSize.location != null && photoSize.location.volume_id == fileLocation.volume_id && photoSize.location.local_id == fileLocation.local_id) {
                            imageReceiver = cell.getPhotoImage();
                            break;
                        }
                    }
                }
            }
        }
        if (imageReceiver != null) {
            if (onlyIfVisible && view.getY() + imageReceiver.getImageY2() < chatListViewPaddingTop - AndroidUtilities.dp(4)) {
                return null;
            }
            int[] coords = new int[2];
            view.getLocationInWindow(coords);
            PhotoViewer.PlaceProviderObject object = new PhotoViewer.PlaceProviderObject();
            object.viewX = coords[0];
            object.viewY = coords[1] - (Build.VERSION.SDK_INT >= 21 ? 0 : AndroidUtilities.statusBarHeight);
            object.parentView = chatListView;
            object.animatingImageView = !SharedConfig.smoothKeyboard && pagedownButton != null && pagedownButton.getTag() != null && view instanceof ChatMessageCell ? animatingImageView : null;
            object.imageReceiver = imageReceiver;
            if (needPreview) {
                object.thumb = imageReceiver.getBitmapSafe();
            }
            object.radius = imageReceiver.getRoundRadius();
            if (view instanceof ChatActionCell && currentChat != null) {
                object.dialogId = -currentChat.id;
            }
            object.clipTopAddition = (int) (chatListViewPaddingTop - chatListViewPaddingVisibleOffset - AndroidUtilities.dp(4));
            return object;
        }
    }
    return null;
}
Also used : ImageReceiver(org.telegram.messenger.ImageReceiver) ChatActionCell(org.telegram.ui.Cells.ChatActionCell) ChatMessageCell(org.telegram.ui.Cells.ChatMessageCell) HorizontalScrollView(android.widget.HorizontalScrollView) PinnedLineView(org.telegram.ui.Components.PinnedLineView) BotCommandsMenuView(org.telegram.ui.Components.BotCommandsMenuView) ReactedHeaderView(org.telegram.ui.Components.ReactedHeaderView) PipRoundVideoView(org.telegram.ui.Components.PipRoundVideoView) SimpleTextView(org.telegram.ui.ActionBar.SimpleTextView) RecyclerView(androidx.recyclerview.widget.RecyclerView) BluredView(org.telegram.ui.Components.BluredView) InstantCameraView(org.telegram.ui.Components.InstantCameraView) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) ChatActivityEnterTopView(org.telegram.ui.Components.ChatActivityEnterTopView) ChatBigEmptyView(org.telegram.ui.Components.ChatBigEmptyView) BackupImageView(org.telegram.ui.Components.BackupImageView) TextureView(android.view.TextureView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ImageView(android.widget.ImageView) RadialProgressView(org.telegram.ui.Components.RadialProgressView) ChatGreetingsView(org.telegram.ui.Components.ChatGreetingsView) UndoView(org.telegram.ui.Components.UndoView) CounterView(org.telegram.ui.Components.CounterView) HintView(org.telegram.ui.Components.HintView) FragmentContextView(org.telegram.ui.Components.FragmentContextView) ClippingImageView(org.telegram.ui.Components.ClippingImageView) EmojiView(org.telegram.ui.Components.EmojiView) ChecksHintView(org.telegram.ui.Components.ChecksHintView) ThemeEditorView(org.telegram.ui.Components.ThemeEditorView) View(android.view.View) SearchCounterView(org.telegram.ui.Components.SearchCounterView) ForwardingPreviewView(org.telegram.ui.Components.ForwardingPreviewView) ReactionTabHolderView(org.telegram.ui.Components.ReactionTabHolderView) TextView(android.widget.TextView) ReactedUsersListView(org.telegram.ui.Components.ReactedUsersListView) NumberTextView(org.telegram.ui.Components.NumberTextView) MessageObject(org.telegram.messenger.MessageObject) Paint(android.graphics.Paint) TextSelectionHint(org.telegram.ui.Components.TextSelectionHint) TextPaint(android.text.TextPaint) SuppressLint(android.annotation.SuppressLint) TLRPC(org.telegram.tgnet.TLRPC)

Aggregations

Paint (android.graphics.Paint)16 ChatActionCell (org.telegram.ui.Cells.ChatActionCell)16 ChatMessageCell (org.telegram.ui.Cells.ChatMessageCell)16 MessageObject (org.telegram.messenger.MessageObject)15 RecyclerListView (org.telegram.ui.Components.RecyclerListView)14 SuppressLint (android.annotation.SuppressLint)13 TextPaint (android.text.TextPaint)13 TextureView (android.view.TextureView)13 View (android.view.View)13 ImageView (android.widget.ImageView)13 TextView (android.widget.TextView)13 RecyclerView (androidx.recyclerview.widget.RecyclerView)13 SimpleTextView (org.telegram.ui.ActionBar.SimpleTextView)13 PipRoundVideoView (org.telegram.ui.Components.PipRoundVideoView)13 RadialProgressView (org.telegram.ui.Components.RadialProgressView)13 UndoView (org.telegram.ui.Components.UndoView)13 HorizontalScrollView (android.widget.HorizontalScrollView)11 BackupImageView (org.telegram.ui.Components.BackupImageView)11 BluredView (org.telegram.ui.Components.BluredView)11 BotCommandsMenuView (org.telegram.ui.Components.BotCommandsMenuView)11