Search in sources :

Example 6 with DialogCell

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

the class DialogsItemAnimator method endAnimations.

@Override
public void endAnimations() {
    int count = mPendingMoves.size();
    for (int i = count - 1; i >= 0; i--) {
        MoveInfo item = mPendingMoves.get(i);
        View view = item.holder.itemView;
        view.setTranslationY(0);
        view.setTranslationX(0);
        dispatchMoveFinished(item.holder);
        mPendingMoves.remove(i);
    }
    count = mPendingRemovals.size();
    for (int i = count - 1; i >= 0; i--) {
        ViewHolder item = mPendingRemovals.get(i);
        View view = item.itemView;
        view.setTranslationY(0);
        view.setTranslationX(0);
        dispatchRemoveFinished(item);
        mPendingRemovals.remove(i);
    }
    count = mPendingAdditions.size();
    for (int i = count - 1; i >= 0; i--) {
        ViewHolder item = mPendingAdditions.get(i);
        if (item.itemView instanceof DialogCell) {
            ((DialogCell) item.itemView).setClipProgress(0.0f);
        } else {
            item.itemView.setAlpha(1);
        }
        dispatchAddFinished(item);
        mPendingAdditions.remove(i);
    }
    count = mPendingChanges.size();
    for (int i = count - 1; i >= 0; i--) {
        endChangeAnimationIfNecessary(mPendingChanges.get(i));
    }
    mPendingChanges.clear();
    if (!isRunning()) {
        return;
    }
    int listCount = mMovesList.size();
    for (int i = listCount - 1; i >= 0; i--) {
        ArrayList<MoveInfo> moves = mMovesList.get(i);
        count = moves.size();
        for (int j = count - 1; j >= 0; j--) {
            MoveInfo moveInfo = moves.get(j);
            ViewHolder item = moveInfo.holder;
            View view = item.itemView;
            view.setTranslationY(0);
            view.setTranslationX(0);
            dispatchMoveFinished(moveInfo.holder);
            moves.remove(j);
            if (moves.isEmpty()) {
                mMovesList.remove(moves);
            }
        }
    }
    listCount = mAdditionsList.size();
    for (int i = listCount - 1; i >= 0; i--) {
        ArrayList<ViewHolder> additions = mAdditionsList.get(i);
        count = additions.size();
        for (int j = count - 1; j >= 0; j--) {
            ViewHolder item = additions.get(j);
            View view = item.itemView;
            if (view instanceof DialogCell) {
                ((DialogCell) view).setClipProgress(0.0f);
            } else {
                view.setAlpha(1);
            }
            dispatchAddFinished(item);
            additions.remove(j);
            if (additions.isEmpty()) {
                mAdditionsList.remove(additions);
            }
        }
    }
    listCount = mChangesList.size();
    for (int i = listCount - 1; i >= 0; i--) {
        ArrayList<ChangeInfo> changes = mChangesList.get(i);
        count = changes.size();
        for (int j = count - 1; j >= 0; j--) {
            endChangeAnimationIfNecessary(changes.get(j));
            if (changes.isEmpty()) {
                mChangesList.remove(changes);
            }
        }
    }
    cancelAll(mRemoveAnimations);
    cancelAll(mMoveAnimations);
    cancelAll(mAddAnimations);
    cancelAll(mChangeAnimations);
    dispatchAnimationsFinished();
}
Also used : DialogCell(org.telegram.ui.Cells.DialogCell) ViewHolder(androidx.recyclerview.widget.RecyclerView.ViewHolder) View(android.view.View)

Example 7 with DialogCell

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

the class DialogsAdapter method onCreateViewHolder.

@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup viewGroup, int viewType) {
    View view;
    switch(viewType) {
        case 0:
            DialogCell dialogCell = new DialogCell(parentFragment, mContext, true, false, currentAccount, null);
            dialogCell.setArchivedPullAnimation(pullForegroundDrawable);
            dialogCell.setPreloader(preloader);
            view = dialogCell;
            break;
        case 1:
            FlickerLoadingView flickerLoadingView = new FlickerLoadingView(mContext);
            flickerLoadingView.setIsSingleCell(true);
            flickerLoadingView.setViewType(FlickerLoadingView.DIALOG_CELL_TYPE);
            view = flickerLoadingView;
            break;
        case 2:
            {
                HeaderCell headerCell = new HeaderCell(mContext);
                headerCell.setText(LocaleController.getString("RecentlyViewed", R.string.RecentlyViewed));
                TextView textView = new TextView(mContext);
                textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15);
                textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf"));
                textView.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlueHeader));
                textView.setText(LocaleController.getString("RecentlyViewedHide", R.string.RecentlyViewedHide));
                textView.setGravity((LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.CENTER_VERTICAL);
                headerCell.addView(textView, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT, (LocaleController.isRTL ? Gravity.LEFT : Gravity.RIGHT) | Gravity.TOP, 17, 15, 17, 0));
                textView.setOnClickListener(view1 -> {
                    MessagesController.getInstance(currentAccount).hintDialogs.clear();
                    SharedPreferences preferences = MessagesController.getGlobalMainSettings();
                    preferences.edit().remove("installReferer").commit();
                    notifyDataSetChanged();
                });
                view = headerCell;
                break;
            }
        case 3:
            FrameLayout frameLayout = new FrameLayout(mContext) {

                @Override
                protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
                    super.onMeasure(MeasureSpec.makeMeasureSpec(MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(AndroidUtilities.dp(12), MeasureSpec.EXACTLY));
                }
            };
            frameLayout.setBackgroundColor(Theme.getColor(Theme.key_windowBackgroundGray));
            View v = new View(mContext);
            v.setBackgroundDrawable(Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow));
            frameLayout.addView(v, LayoutHelper.createFrame(LayoutHelper.MATCH_PARENT, LayoutHelper.MATCH_PARENT));
            view = frameLayout;
            break;
        case 4:
            view = new DialogMeUrlCell(mContext);
            break;
        case 5:
            view = new DialogsEmptyCell(mContext);
            break;
        case 6:
            view = new UserCell(mContext, 8, 0, false);
            break;
        case 7:
            view = new HeaderCell(mContext);
            break;
        case 8:
            {
                view = new ShadowSectionCell(mContext);
                Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
                CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
                combinedDrawable.setFullsize(true);
                view.setBackgroundDrawable(combinedDrawable);
                break;
            }
        case 9:
            archiveHintCell = new ArchiveHintCell(mContext);
            view = archiveHintCell;
            break;
        case 10:
            {
                view = new LastEmptyView(mContext);
                break;
            }
        case 11:
            {
                view = new TextInfoPrivacyCell(mContext) {

                    private int movement;

                    private float moveProgress;

                    private long lastUpdateTime;

                    private int originalX;

                    private int originalY;

                    @Override
                    protected void afterTextDraw() {
                        if (arrowDrawable != null) {
                            Rect bounds = arrowDrawable.getBounds();
                            arrowDrawable.setBounds(originalX, originalY, originalX + bounds.width(), originalY + bounds.height());
                        }
                    }

                    @Override
                    protected void onTextDraw() {
                        if (arrowDrawable != null) {
                            Rect bounds = arrowDrawable.getBounds();
                            int dx = (int) (moveProgress * AndroidUtilities.dp(3));
                            originalX = bounds.left;
                            originalY = bounds.top;
                            arrowDrawable.setBounds(originalX + dx, originalY + AndroidUtilities.dp(1), originalX + dx + bounds.width(), originalY + AndroidUtilities.dp(1) + bounds.height());
                            long newUpdateTime = SystemClock.elapsedRealtime();
                            long dt = newUpdateTime - lastUpdateTime;
                            if (dt > 17) {
                                dt = 17;
                            }
                            lastUpdateTime = newUpdateTime;
                            if (movement == 0) {
                                moveProgress += dt / 664.0f;
                                if (moveProgress >= 1.0f) {
                                    movement = 1;
                                    moveProgress = 1.0f;
                                }
                            } else {
                                moveProgress -= dt / 664.0f;
                                if (moveProgress <= 0.0f) {
                                    movement = 0;
                                    moveProgress = 0.0f;
                                }
                            }
                            getTextView().invalidate();
                        }
                    }
                };
                Drawable drawable = Theme.getThemedDrawable(mContext, R.drawable.greydivider, Theme.key_windowBackgroundGrayShadow);
                CombinedDrawable combinedDrawable = new CombinedDrawable(new ColorDrawable(Theme.getColor(Theme.key_windowBackgroundGray)), drawable);
                combinedDrawable.setFullsize(true);
                view.setBackgroundDrawable(combinedDrawable);
                break;
            }
        case 12:
        default:
            {
                view = new TextCell(mContext);
            }
    }
    view.setLayoutParams(new RecyclerView.LayoutParams(RecyclerView.LayoutParams.MATCH_PARENT, viewType == 5 ? RecyclerView.LayoutParams.MATCH_PARENT : RecyclerView.LayoutParams.WRAP_CONTENT));
    return new RecyclerListView.Holder(view);
}
Also used : ArchiveHintCell(org.telegram.ui.Cells.ArchiveHintCell) Rect(android.graphics.Rect) FrameLayout(android.widget.FrameLayout) AndroidUtilities(org.telegram.messenger.AndroidUtilities) ColorDrawable(android.graphics.drawable.ColorDrawable) Drawable(android.graphics.drawable.Drawable) ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) TextCell(org.telegram.ui.Cells.TextCell) PullForegroundDrawable(org.telegram.ui.Components.PullForegroundDrawable) DialogsActivity(org.telegram.ui.DialogsActivity) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) PorterDuff(android.graphics.PorterDuff) ConnectionsManager(org.telegram.tgnet.ConnectionsManager) ViewGroup(android.view.ViewGroup) UserConfig(org.telegram.messenger.UserConfig) TextView(android.widget.TextView) PorterDuffColorFilter(android.graphics.PorterDuffColorFilter) Context(android.content.Context) Theme(org.telegram.ui.ActionBar.Theme) ViewPager(androidx.viewpager.widget.ViewPager) SystemClock(android.os.SystemClock) LocaleController(org.telegram.messenger.LocaleController) HeaderCell(org.telegram.ui.Cells.HeaderCell) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) TLRPC(org.telegram.tgnet.TLRPC) ActionBar(org.telegram.ui.ActionBar.ActionBar) DialogMeUrlCell(org.telegram.ui.Cells.DialogMeUrlCell) TLObject(org.telegram.tgnet.TLObject) SharedConfig(org.telegram.messenger.SharedConfig) DialogsEmptyCell(org.telegram.ui.Cells.DialogsEmptyCell) BuildVars(org.telegram.messenger.BuildVars) Build(android.os.Build) DialogCell(org.telegram.ui.Cells.DialogCell) DialogObject(org.telegram.messenger.DialogObject) UserCell(org.telegram.ui.Cells.UserCell) R(org.telegram.messenger.R) LayoutHelper(org.telegram.ui.Components.LayoutHelper) FileLog(org.telegram.messenger.FileLog) FlickerLoadingView(org.telegram.ui.Components.FlickerLoadingView) MessagesController(org.telegram.messenger.MessagesController) Gravity(android.view.Gravity) SharedPreferences(android.content.SharedPreferences) TypedValue(android.util.TypedValue) ContactsController(org.telegram.messenger.ContactsController) Collections(java.util.Collections) RecyclerListView(org.telegram.ui.Components.RecyclerListView) HeaderCell(org.telegram.ui.Cells.HeaderCell) TextCell(org.telegram.ui.Cells.TextCell) DialogCell(org.telegram.ui.Cells.DialogCell) DialogsEmptyCell(org.telegram.ui.Cells.DialogsEmptyCell) TextView(android.widget.TextView) FlickerLoadingView(org.telegram.ui.Components.FlickerLoadingView) UserCell(org.telegram.ui.Cells.UserCell) Rect(android.graphics.Rect) ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) SharedPreferences(android.content.SharedPreferences) ColorDrawable(android.graphics.drawable.ColorDrawable) Drawable(android.graphics.drawable.Drawable) PullForegroundDrawable(org.telegram.ui.Components.PullForegroundDrawable) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) TextView(android.widget.TextView) FlickerLoadingView(org.telegram.ui.Components.FlickerLoadingView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) DialogMeUrlCell(org.telegram.ui.Cells.DialogMeUrlCell) ColorDrawable(android.graphics.drawable.ColorDrawable) FrameLayout(android.widget.FrameLayout) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) ArchiveHintCell(org.telegram.ui.Cells.ArchiveHintCell) RecyclerView(androidx.recyclerview.widget.RecyclerView)

Example 8 with DialogCell

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

the class DialogsActivity method onItemLongClick.

private boolean onItemLongClick(View view, int position, float x, float y, int dialogsType, RecyclerListView.Adapter adapter) {
    if (getParentActivity() == null) {
        return false;
    }
    if (!actionBar.isActionModeShowed() && !AndroidUtilities.isTablet() && !onlySelect && view instanceof DialogCell) {
        DialogCell cell = (DialogCell) view;
        if (cell.isPointInsideAvatar(x, y)) {
            return showChatPreview(cell);
        }
    }
    if (adapter == searchViewPager.dialogsSearchAdapter) {
        Object item = searchViewPager.dialogsSearchAdapter.getItem(position);
        if (searchViewPager.dialogsSearchAdapter.isRecentSearchDisplayed()) {
            AlertDialog.Builder builder = new AlertDialog.Builder(getParentActivity());
            builder.setTitle(LocaleController.getString("ClearSearchSingleAlertTitle", R.string.ClearSearchSingleAlertTitle));
            long did;
            if (item instanceof TLRPC.Chat) {
                TLRPC.Chat chat = (TLRPC.Chat) item;
                builder.setMessage(LocaleController.formatString("ClearSearchSingleChatAlertText", R.string.ClearSearchSingleChatAlertText, chat.title));
                did = -chat.id;
            } else if (item instanceof TLRPC.User) {
                TLRPC.User user = (TLRPC.User) item;
                if (user.id == getUserConfig().clientUserId) {
                    builder.setMessage(LocaleController.formatString("ClearSearchSingleChatAlertText", R.string.ClearSearchSingleChatAlertText, LocaleController.getString("SavedMessages", R.string.SavedMessages)));
                } else {
                    builder.setMessage(LocaleController.formatString("ClearSearchSingleUserAlertText", R.string.ClearSearchSingleUserAlertText, ContactsController.formatName(user.first_name, user.last_name)));
                }
                did = user.id;
            } else if (item instanceof TLRPC.EncryptedChat) {
                TLRPC.EncryptedChat encryptedChat = (TLRPC.EncryptedChat) item;
                TLRPC.User user = getMessagesController().getUser(encryptedChat.user_id);
                builder.setMessage(LocaleController.formatString("ClearSearchSingleUserAlertText", R.string.ClearSearchSingleUserAlertText, ContactsController.formatName(user.first_name, user.last_name)));
                did = DialogObject.makeEncryptedDialogId(encryptedChat.id);
            } else {
                return false;
            }
            builder.setPositiveButton(LocaleController.getString("ClearSearchRemove", R.string.ClearSearchRemove).toUpperCase(), (dialogInterface, i) -> searchViewPager.dialogsSearchAdapter.removeRecentSearch(did));
            builder.setNegativeButton(LocaleController.getString("Cancel", R.string.Cancel), null);
            AlertDialog alertDialog = builder.create();
            showDialog(alertDialog);
            TextView button = (TextView) alertDialog.getButton(DialogInterface.BUTTON_POSITIVE);
            if (button != null) {
                button.setTextColor(Theme.getColor(Theme.key_dialogTextRed2));
            }
            return true;
        }
    }
    TLRPC.Dialog dialog;
    if (adapter == searchViewPager.dialogsSearchAdapter) {
        long dialogId = 0;
        if (view instanceof ProfileSearchCell && !searchViewPager.dialogsSearchAdapter.isGlobalSearch(position)) {
            dialogId = ((ProfileSearchCell) view).getDialogId();
        }
        if (dialogId != 0) {
            showOrUpdateActionMode(dialogId, view);
            return true;
        }
        return false;
    } else {
        DialogsAdapter dialogsAdapter = (DialogsAdapter) adapter;
        ArrayList<TLRPC.Dialog> dialogs = getDialogsArray(currentAccount, dialogsType, folderId, dialogsListFrozen);
        position = dialogsAdapter.fixPosition(position);
        if (position < 0 || position >= dialogs.size()) {
            return false;
        }
        dialog = dialogs.get(position);
    }
    if (dialog == null) {
        return false;
    }
    if (onlySelect) {
        if (initialDialogsType != 3 && initialDialogsType != 10) {
            return false;
        }
        if (!validateSlowModeDialog(dialog.id)) {
            return false;
        }
        if (!(initialDialogsType == 3 && selectAlertString != null)) {
            addOrRemoveSelectedDialog(dialog.id, view);
            updateSelectedCount();
        }
    } else {
        if (dialog instanceof TLRPC.TL_dialogFolder) {
            view.performHapticFeedback(HapticFeedbackConstants.LONG_PRESS, HapticFeedbackConstants.FLAG_IGNORE_GLOBAL_SETTING);
            BottomSheet.Builder builder = new BottomSheet.Builder(getParentActivity());
            final boolean hasUnread = getMessagesStorage().getArchiveUnreadCount() != 0;
            int[] icons = new int[] { hasUnread ? R.drawable.menu_read : 0, SharedConfig.archiveHidden ? R.drawable.chats_pin : R.drawable.chats_unpin };
            CharSequence[] items = new CharSequence[] { hasUnread ? LocaleController.getString("MarkAllAsRead", R.string.MarkAllAsRead) : null, SharedConfig.archiveHidden ? LocaleController.getString("PinInTheList", R.string.PinInTheList) : LocaleController.getString("HideAboveTheList", R.string.HideAboveTheList) };
            builder.setItems(items, icons, (d, which) -> {
                if (which == 0) {
                    getMessagesStorage().readAllDialogs(1);
                } else if (which == 1 && viewPages != null) {
                    for (int a = 0; a < viewPages.length; a++) {
                        if (viewPages[a].dialogsType != 0 || viewPages[a].getVisibility() != View.VISIBLE) {
                            continue;
                        }
                        View child = viewPages[a].listView.getChildAt(0);
                        DialogCell dialogCell = null;
                        if (child instanceof DialogCell && ((DialogCell) child).isFolderCell()) {
                            dialogCell = (DialogCell) child;
                        }
                        viewPages[a].listView.toggleArchiveHidden(true, dialogCell);
                    }
                }
            });
            showDialog(builder.create());
            return false;
        }
        if (actionBar.isActionModeShowed() && isDialogPinned(dialog)) {
            return false;
        }
        showOrUpdateActionMode(dialog.id, view);
    }
    return true;
}
Also used : AlertDialog(org.telegram.ui.ActionBar.AlertDialog) TLRPC(org.telegram.tgnet.TLRPC) DialogCell(org.telegram.ui.Cells.DialogCell) HintDialogCell(org.telegram.ui.Cells.HintDialogCell) Dialog(android.app.Dialog) AlertDialog(org.telegram.ui.ActionBar.AlertDialog) TextView(android.widget.TextView) NumberTextView(org.telegram.ui.Components.NumberTextView) DialogsAdapter(org.telegram.ui.Adapters.DialogsAdapter) ImageView(android.widget.ImageView) FilterTabsView(org.telegram.ui.Components.FilterTabsView) UndoView(org.telegram.ui.Components.UndoView) SwipeGestureSettingsView(org.telegram.ui.Components.SwipeGestureSettingsView) FragmentContextView(org.telegram.ui.Components.FragmentContextView) ScrollView(android.widget.ScrollView) FiltersView(org.telegram.ui.Adapters.FiltersView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) RLottieImageView(org.telegram.ui.Components.RLottieImageView) TextView(android.widget.TextView) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) BackupImageView(org.telegram.ui.Components.BackupImageView) FlickerLoadingView(org.telegram.ui.Components.FlickerLoadingView) NumberTextView(org.telegram.ui.Components.NumberTextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ProfileSearchCell(org.telegram.ui.Cells.ProfileSearchCell) UserObject(org.telegram.messenger.UserObject) ChatObject(org.telegram.messenger.ChatObject) TLObject(org.telegram.tgnet.TLObject) MessageObject(org.telegram.messenger.MessageObject) DialogObject(org.telegram.messenger.DialogObject) BottomSheet(org.telegram.ui.ActionBar.BottomSheet) FiltersListBottomSheet(org.telegram.ui.Components.FiltersListBottomSheet)

Example 9 with DialogCell

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

the class DialogsActivity method getThemeDescriptions.

@Override
public ArrayList<ThemeDescription> getThemeDescriptions() {
    ThemeDescription.ThemeDescriptionDelegate cellDelegate = () -> {
        for (int b = 0; b < 3; b++) {
            RecyclerListView list;
            if (b == 2) {
                if (searchViewPager == null) {
                    continue;
                }
                list = searchViewPager.searchListView;
            } else if (viewPages != null) {
                list = b < viewPages.length ? viewPages[b].listView : null;
            } else {
                continue;
            }
            if (list == null) {
                continue;
            }
            int count = list.getChildCount();
            for (int a = 0; a < count; a++) {
                View child = list.getChildAt(a);
                if (child instanceof ProfileSearchCell) {
                    ((ProfileSearchCell) child).update(0);
                } else if (child instanceof DialogCell) {
                    ((DialogCell) child).update(0);
                } else if (child instanceof UserCell) {
                    ((UserCell) child).update(0);
                }
            }
        }
        if (searchViewPager != null && searchViewPager.dialogsSearchAdapter != null) {
            RecyclerListView recyclerListView = searchViewPager.dialogsSearchAdapter.getInnerListView();
            if (recyclerListView != null) {
                int count = recyclerListView.getChildCount();
                for (int a = 0; a < count; a++) {
                    View child = recyclerListView.getChildAt(a);
                    if (child instanceof HintDialogCell) {
                        ((HintDialogCell) child).update();
                    }
                }
            }
        }
        if (sideMenu != null) {
            View child = sideMenu.getChildAt(0);
            if (child instanceof DrawerProfileCell) {
                DrawerProfileCell profileCell = (DrawerProfileCell) child;
                profileCell.applyBackground(true);
                profileCell.updateColors();
            }
        }
        if (viewPages != null) {
            for (int a = 0; a < viewPages.length; a++) {
                if (viewPages[a].pullForegroundDrawable == null) {
                    continue;
                }
                viewPages[a].pullForegroundDrawable.updateColors();
            }
        }
        if (actionBar != null) {
            actionBar.setPopupBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground), true);
            actionBar.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), false, true);
            actionBar.setPopupItemsColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuItemIcon), true, true);
            actionBar.setPopupItemsSelectorColor(Theme.getColor(Theme.key_dialogButtonSelector), true);
        }
        if (scrimPopupWindowItems != null) {
            for (int a = 0; a < scrimPopupWindowItems.length; a++) {
                scrimPopupWindowItems[a].setColors(Theme.getColor(Theme.key_actionBarDefaultSubmenuItem), Theme.getColor(Theme.key_actionBarDefaultSubmenuItemIcon));
                scrimPopupWindowItems[a].setSelectorColor(Theme.getColor(Theme.key_dialogButtonSelector));
            }
        }
        if (scrimPopupWindow != null) {
            final View contentView = scrimPopupWindow.getContentView();
            contentView.setBackgroundColor(Theme.getColor(Theme.key_actionBarDefaultSubmenuBackground));
            contentView.invalidate();
        }
        if (doneItem != null) {
            doneItem.setIconColor(Theme.getColor(Theme.key_actionBarDefaultIcon));
        }
        if (commentView != null) {
            commentView.updateColors();
        }
        if (filtersView != null) {
            filtersView.updateColors();
        }
        if (searchViewPager != null) {
            searchViewPager.updateColors();
        }
        if (searchTabsView != null) {
            searchTabsView.updateColors();
        }
        if (searchItem != null) {
            EditTextBoldCursor editText = searchItem.getSearchField();
            if (whiteActionBar) {
                editText.setTextColor(Theme.getColor(Theme.key_windowBackgroundWhiteBlackText));
                editText.setHintTextColor(Theme.getColor(Theme.key_player_time));
                editText.setCursorColor(Theme.getColor(Theme.key_chat_messagePanelCursor));
            } else {
                editText.setCursorColor(Theme.getColor(Theme.key_actionBarDefaultSearch));
                editText.setHintTextColor(Theme.getColor(Theme.key_actionBarDefaultSearchPlaceholder));
                editText.setTextColor(Theme.getColor(Theme.key_actionBarDefaultSearch));
            }
            searchItem.updateColor();
        }
        setSearchAnimationProgress(searchAnimationProgress);
    };
    ArrayList<ThemeDescription> arrayList = new ArrayList<>();
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
    if (movingView != null) {
        arrayList.add(new ThemeDescription(movingView, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_windowBackgroundWhite));
    }
    if (doneItem != null) {
        arrayList.add(new ThemeDescription(doneItem, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_actionBarDefaultSelector));
    }
    if (folderId == 0) {
        if (onlySelect) {
            arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_actionBarDefault));
        }
        arrayList.add(new ThemeDescription(fragmentView, 0, null, actionBarDefaultPaint, null, null, Theme.key_actionBarDefault));
        if (searchViewPager != null) {
            arrayList.add(new ThemeDescription(searchViewPager.searchListView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault));
        }
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, cellDelegate, Theme.key_actionBarDefaultIcon));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, new Drawable[] { Theme.dialogs_holidayDrawable }, null, Theme.key_actionBarDefaultTitle));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultSelector));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCH, null, null, null, null, Theme.key_actionBarDefaultSearch));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_actionBarDefaultSearchPlaceholder));
    } else {
        arrayList.add(new ThemeDescription(fragmentView, 0, null, actionBarDefaultPaint, null, null, Theme.key_actionBarDefaultArchived));
        if (searchViewPager != null) {
            arrayList.add(new ThemeDescription(searchViewPager.searchListView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchived));
        }
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchivedIcon));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_TITLECOLOR, null, null, new Drawable[] { Theme.dialogs_holidayDrawable }, null, Theme.key_actionBarDefaultArchivedTitle));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchivedSelector));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCH, null, null, null, null, Theme.key_actionBarDefaultArchivedSearch));
        arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_SEARCHPLACEHOLDER, null, null, null, null, Theme.key_actionBarDefaultArchivedSearchPlaceholder));
    }
    arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_ITEMSCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
    // arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_BACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefault));
    arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_TOPBACKGROUND, null, null, null, null, Theme.key_actionBarActionModeDefaultTop));
    arrayList.add(new ThemeDescription(actionBar, ThemeDescription.FLAG_AB_AM_SELECTORCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultSelector));
    arrayList.add(new ThemeDescription(selectedDialogsCountTextView, ThemeDescription.FLAG_TEXTCOLOR, null, null, null, null, Theme.key_actionBarActionModeDefaultIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarDefaultSubmenuBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarDefaultSubmenuItem));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarDefaultSubmenuItemIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_dialogButtonSelector));
    if (filterTabsView != null) {
        if (actionBar.isActionModeShowed()) {
            arrayList.add(new ThemeDescription(filterTabsView, 0, new Class[] { FilterTabsView.class }, new String[] { "selectorDrawable" }, null, null, null, Theme.key_profile_tabSelectedLine));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_profile_tabSelectedText));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_profile_tabText));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_profile_tabSelector));
        } else {
            arrayList.add(new ThemeDescription(filterTabsView, 0, new Class[] { FilterTabsView.class }, new String[] { "selectorDrawable" }, null, null, null, Theme.key_actionBarTabLine));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_actionBarTabActiveText));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_actionBarTabUnactiveText));
            arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_actionBarTabSelector));
        }
        arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), 0, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_chats_tabUnreadActiveBackground));
        arrayList.add(new ThemeDescription(filterTabsView.getTabsContainer(), 0, new Class[] { FilterTabsView.TabView.class }, null, null, null, Theme.key_chats_tabUnreadUnactiveBackground));
    }
    arrayList.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_IMAGECOLOR, null, null, null, null, Theme.key_chats_actionIcon));
    arrayList.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_chats_actionBackground));
    arrayList.add(new ThemeDescription(floatingButton, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_DRAWABLESELECTEDSTATE, null, null, null, null, Theme.key_chats_actionPressedBackground));
    for (int a = 0; a < 3; a++) {
        RecyclerListView list;
        if (a == 2) {
            if (searchViewPager == null) {
                continue;
            }
            list = searchViewPager.searchListView;
        } else if (viewPages != null) {
            list = a < viewPages.length ? viewPages[a].listView : null;
        } else {
            continue;
        }
        if (list == null) {
            continue;
        }
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_SELECTOR, null, null, null, null, Theme.key_listSelector));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { View.class }, Theme.dividerPaint, null, null, Theme.key_divider));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, Theme.avatarDrawables, null, Theme.key_avatar_text));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_countPaint, null, null, Theme.key_chats_unreadCounter));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_countGrayPaint, null, null, Theme.key_chats_unreadCounterMuted));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_countTextPaint, null, null, Theme.key_chats_unreadCounterText));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_lockDrawable }, null, Theme.key_chats_secretIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_groupDrawable, Theme.dialogs_broadcastDrawable, Theme.dialogs_botDrawable }, null, Theme.key_chats_nameIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_scamDrawable, Theme.dialogs_fakeDrawable }, null, Theme.key_chats_draft));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_pinnedDrawable, Theme.dialogs_reorderDrawable }, null, Theme.key_chats_pinnedIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Paint[] { Theme.dialogs_namePaint[0], Theme.dialogs_namePaint[1], Theme.dialogs_searchNamePaint }, null, null, Theme.key_chats_name));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Paint[] { Theme.dialogs_nameEncryptedPaint[0], Theme.dialogs_nameEncryptedPaint[1], Theme.dialogs_searchNameEncryptedPaint }, null, null, Theme.key_chats_secretName));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_messagePaint[1], null, null, Theme.key_chats_message_threeLines));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_messagePaint[0], null, null, Theme.key_chats_message));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_messageNamePaint, null, null, Theme.key_chats_nameMessage_threeLines));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_draft));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, Theme.dialogs_messagePrintingPaint, null, null, Theme.key_chats_actionMessage));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_timePaint, null, null, Theme.key_chats_date));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_pinnedPaint, null, null, Theme.key_chats_pinnedOverlay));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_tabletSeletedPaint, null, null, Theme.key_chats_tabletSelectedOverlay));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_checkDrawable }, null, Theme.key_chats_sentCheck));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_checkReadDrawable, Theme.dialogs_halfCheckDrawable }, null, Theme.key_chats_sentReadCheck));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_clockDrawable }, null, Theme.key_chats_sentClock));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, Theme.dialogs_errorPaint, null, null, Theme.key_chats_sentError));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_errorDrawable }, null, Theme.key_chats_sentErrorIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_verifiedCheckDrawable }, null, Theme.key_chats_verifiedCheck));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class, ProfileSearchCell.class }, null, new Drawable[] { Theme.dialogs_verifiedDrawable }, null, Theme.key_chats_verifiedBackground));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_muteDrawable }, null, Theme.key_chats_muteIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, new Drawable[] { Theme.dialogs_mentionDrawable }, null, Theme.key_chats_mentionIcon));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_archivePinBackground));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_archiveBackground));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_chats_onlineCircle));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { DialogCell.class }, null, null, null, Theme.key_windowBackgroundWhite));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_CHECKBOX, new Class[] { DialogCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_windowBackgroundWhite));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_CHECKBOXCHECK, new Class[] { DialogCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_checkboxCheck));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { LoadingCell.class }, new String[] { "progressBar" }, null, null, null, Theme.key_progressCircle));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { ProfileSearchCell.class }, Theme.dialogs_offlinePaint, null, null, Theme.key_windowBackgroundWhiteGrayText3));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { ProfileSearchCell.class }, Theme.dialogs_onlinePaint, null, null, Theme.key_windowBackgroundWhiteBlueText3));
        GraySectionCell.createThemeDescriptions(arrayList, list);
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { HashtagSearchCell.class }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { ShadowSectionCell.class }, null, null, null, Theme.key_windowBackgroundGray));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER, new Class[] { TextInfoPrivacyCell.class }, null, null, null, Theme.key_windowBackgroundGrayShadow));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_BACKGROUNDFILTER | ThemeDescription.FLAG_CELLBACKGROUNDCOLOR, new Class[] { TextInfoPrivacyCell.class }, null, null, null, Theme.key_windowBackgroundGray));
        arrayList.add(new ThemeDescription(list, 0, new Class[] { TextInfoPrivacyCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteGrayText4));
        arrayList.add(new ThemeDescription(list, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText2));
    }
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundRed));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundOrange));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundViolet));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundGreen));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundCyan));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundBlue));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundPink));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundSaved));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundArchived));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_backgroundArchivedHidden));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameMessage));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_draft));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_attachMessage));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameArchived));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameMessageArchived));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_nameMessageArchived_threeLines));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_messageArchived));
    if (viewPages != null) {
        for (int a = 0; a < viewPages.length; a++) {
            if (folderId == 0) {
                arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefault));
            } else {
                arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchived));
            }
            arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DialogsEmptyCell.class }, new String[] { "emptyTextView1" }, null, null, null, Theme.key_chats_nameMessage_threeLines));
            arrayList.add(new ThemeDescription(viewPages[a].listView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DialogsEmptyCell.class }, new String[] { "emptyTextView2" }, null, null, null, Theme.key_chats_message));
            if (SharedConfig.archiveHidden) {
                arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow1", Theme.key_avatar_backgroundArchivedHidden));
                arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow2", Theme.key_avatar_backgroundArchivedHidden));
            } else {
                arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow1", Theme.key_avatar_backgroundArchived));
                arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Arrow2", Theme.key_avatar_backgroundArchived));
            }
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Box2", Theme.key_avatar_text));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveAvatarDrawable }, "Box1", Theme.key_avatar_text));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_pinArchiveDrawable }, "Arrow", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_pinArchiveDrawable }, "Line", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unpinArchiveDrawable }, "Arrow", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unpinArchiveDrawable }, "Line", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveDrawable }, "Arrow", Theme.key_chats_archiveBackground));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveDrawable }, "Box2", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_archiveDrawable }, "Box1", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Line 1", Theme.key_chats_archiveBackground));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Line 2", Theme.key_chats_archiveBackground));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Line 3", Theme.key_chats_archiveBackground));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Cup Red", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_hidePsaDrawable }, "Box", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Arrow1", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Arrow2", Theme.key_chats_archivePinBackground));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Box2", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { DialogCell.class }, new RLottieDrawable[] { Theme.dialogs_unarchiveDrawable }, "Box1", Theme.key_chats_archiveIcon));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "statusColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteGrayText));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { UserCell.class }, new String[] { "statusOnlineColor" }, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlueText));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { TextCell.class }, new String[] { "textView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText4));
            arrayList.add(new ThemeDescription(viewPages[a].listView, 0, new Class[] { TextCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_windowBackgroundWhiteBlueText4));
            arrayList.add(new ThemeDescription(viewPages[a].progressView, ThemeDescription.FLAG_PROGRESSBAR, null, null, null, null, Theme.key_progressCircle));
            ViewPager pager = viewPages[a].dialogsAdapter.getArchiveHintCellPager();
            arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "imageView" }, null, null, null, Theme.key_chats_nameMessage_threeLines));
            arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "imageView2" }, null, null, null, Theme.key_chats_unreadCounter));
            arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "headerTextView" }, null, null, null, Theme.key_chats_nameMessage_threeLines));
            arrayList.add(new ThemeDescription(pager, 0, new Class[] { ArchiveHintInnerCell.class }, new String[] { "messageTextView" }, null, null, null, Theme.key_chats_message));
            arrayList.add(new ThemeDescription(pager, ThemeDescription.FLAG_LISTGLOWCOLOR, null, null, null, null, Theme.key_actionBarDefaultArchived));
        }
    }
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_archivePullDownBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chats_archivePullDownBackgroundActive));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_BACKGROUND, null, null, null, null, Theme.key_chats_menuBackground));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuName));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuPhone));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuPhoneCats));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuCloudBackgroundCats));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chat_serviceBackground));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuTopShadow));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerProfileCell.class }, null, null, null, Theme.key_chats_menuTopShadowCats));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { DrawerProfileCell.class }, new String[] { "darkThemeView" }, null, null, null, Theme.key_chats_menuName));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { DrawerProfileCell.class }, null, null, cellDelegate, Theme.key_chats_menuTopBackgroundCats));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_CELLBACKGROUNDCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { DrawerProfileCell.class }, null, null, cellDelegate, Theme.key_chats_menuTopBackground));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { DrawerActionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemIcon));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerActionCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemText));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerUserCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemText));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DrawerUserCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_chats_unreadCounterText));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DrawerUserCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_chats_unreadCounter));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { DrawerUserCell.class }, new String[] { "checkBox" }, null, null, null, Theme.key_chats_menuBackground));
    arrayList.add(new ThemeDescription(sideMenu, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { DrawerAddCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemIcon));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DrawerAddCell.class }, new String[] { "textView" }, null, null, null, Theme.key_chats_menuItemText));
    arrayList.add(new ThemeDescription(sideMenu, 0, new Class[] { DividerCell.class }, Theme.dividerPaint, null, null, Theme.key_divider));
    if (searchViewPager != null) {
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_countPaint, null, null, Theme.key_chats_unreadCounter));
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_countGrayPaint, null, null, Theme.key_chats_unreadCounterMuted));
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_countTextPaint, null, null, Theme.key_chats_unreadCounterText));
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, Theme.dialogs_archiveTextPaint, null, null, Theme.key_chats_archiveText));
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, new String[] { "nameTextView" }, null, null, null, Theme.key_windowBackgroundWhiteBlackText));
        arrayList.add(new ThemeDescription(searchViewPager.dialogsSearchAdapter != null ? searchViewPager.dialogsSearchAdapter.getInnerListView() : null, 0, new Class[] { HintDialogCell.class }, null, null, null, Theme.key_chats_onlineCircle));
    }
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_inappPlayerBackground));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "playButton" }, null, null, null, Theme.key_inappPlayerPlayPause));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerTitle));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_FASTSCROLL, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_inappPlayerPerformer));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[] { FragmentContextView.class }, new String[] { "closeButton" }, null, null, null, Theme.key_inappPlayerClose));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_BACKGROUND | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "frameLayout" }, null, null, null, Theme.key_returnToCallBackground));
    arrayList.add(new ThemeDescription(fragmentView, ThemeDescription.FLAG_TEXTCOLOR | ThemeDescription.FLAG_CHECKTAG, new Class[] { FragmentContextView.class }, new String[] { "titleTextView" }, null, null, null, Theme.key_returnToCallText));
    for (int a = 0; a < undoView.length; a++) {
        arrayList.add(new ThemeDescription(undoView[a], ThemeDescription.FLAG_BACKGROUNDFILTER, null, null, null, null, Theme.key_undo_background));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "undoImageView" }, null, null, null, Theme.key_undo_cancelColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "undoTextView" }, null, null, null, Theme.key_undo_cancelColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "infoTextView" }, null, null, null, Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "subinfoTextView" }, null, null, null, Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "textPaint" }, null, null, null, Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "progressPaint" }, null, null, null, Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "info1", Theme.key_undo_background));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "info2", Theme.key_undo_background));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc12", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc11", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc10", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc9", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc8", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc7", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc6", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc5", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc4", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc3", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc2", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "luc1", Theme.key_undo_infoColor));
        arrayList.add(new ThemeDescription(undoView[a], 0, new Class[] { UndoView.class }, new String[] { "leftImageView" }, "Oval", Theme.key_undo_infoColor));
    }
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBackgroundGray));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlack));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextLink));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogLinkSelection));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue3));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextBlue4));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextRed));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextRed2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray3));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextGray4));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRedIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogTextHint));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogInputField));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogInputFieldActivated));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareCheck));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareUnchecked));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogCheckboxSquareDisabled));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRadioBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRadioBackgroundChecked));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogProgressCircle));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogButton));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogButtonSelector));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogScrollGlow));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRoundCheckBox));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogRoundCheckBoxCheck));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBadgeBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogBadgeText));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogLineProgress));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogLineProgressBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogGrayLine));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialog_inlineProgressBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialog_inlineProgress));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchHint));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogSearchText));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogFloatingButton));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogFloatingIcon));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_dialogShadowLine));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_sheet_scrollUp));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_sheet_other));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBar));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarSelector));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarTitle));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarTop));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarSubtitle));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_actionBarItems));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_background));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_time));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_progressBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_progressCachedBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_progress));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_button));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_player_buttonActive));
    if (commentView != null) {
        arrayList.add(new ThemeDescription(commentView, 0, null, Theme.chat_composeBackgroundPaint, null, null, Theme.key_chat_messagePanelBackground));
        arrayList.add(new ThemeDescription(commentView, 0, null, null, new Drawable[] { Theme.chat_composeShadowDrawable }, null, Theme.key_chat_messagePanelShadow));
        arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_TEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelText));
        arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_CURSORCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelCursor));
        arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_HINTTEXTCOLOR, new Class[] { ChatActivityEnterView.class }, new String[] { "messageEditText" }, null, null, null, Theme.key_chat_messagePanelHint));
    // arrayList.add(new ThemeDescription(commentView, ThemeDescription.FLAG_IMAGECOLOR, new Class[]{ChatActivityEnterView.class}, new String[]{"sendButton"}, null, null, null, Theme.key_chat_messagePanelSend));
    }
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_actionBarTipBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_windowBackgroundWhiteBlackText));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_player_time));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_chat_messagePanelCursor));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_avatar_actionBarIconBlue));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, cellDelegate, Theme.key_groupcreate_spanBackground));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayGreen1));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayGreen2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayBlue1));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayBlue2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGreen1));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGreen2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelBlue1));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelBlue2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_topPanelGray));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientMuted));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientMuted2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientUnmuted));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertGradientUnmuted2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient2));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_mutedByAdminGradient3));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertMutedByAdmin));
    arrayList.add(new ThemeDescription(null, 0, null, null, null, null, Theme.key_voipgroup_overlayAlertMutedByAdmin2));
    if (filtersView != null) {
        arrayList.addAll(filtersView.getThemeDescriptions());
        filtersView.updateColors();
    }
    if (searchViewPager != null) {
        searchViewPager.getThemeDescriptors(arrayList);
    }
    return arrayList;
}
Also used : HintDialogCell(org.telegram.ui.Cells.HintDialogCell) FilterTabsView(org.telegram.ui.Components.FilterTabsView) ArrayList(java.util.ArrayList) RLottieDrawable(org.telegram.ui.Components.RLottieDrawable) RecyclerListView(org.telegram.ui.Components.RecyclerListView) DrawerProfileCell(org.telegram.ui.Cells.DrawerProfileCell) TextCell(org.telegram.ui.Cells.TextCell) DividerCell(org.telegram.ui.Cells.DividerCell) DialogCell(org.telegram.ui.Cells.DialogCell) HintDialogCell(org.telegram.ui.Cells.HintDialogCell) LoadingCell(org.telegram.ui.Cells.LoadingCell) UndoView(org.telegram.ui.Components.UndoView) DrawerActionCell(org.telegram.ui.Cells.DrawerActionCell) DialogsEmptyCell(org.telegram.ui.Cells.DialogsEmptyCell) UserCell(org.telegram.ui.Cells.UserCell) DrawerUserCell(org.telegram.ui.Cells.DrawerUserCell) EditTextBoldCursor(org.telegram.ui.Components.EditTextBoldCursor) ArchiveHintInnerCell(org.telegram.ui.Cells.ArchiveHintInnerCell) ShadowSectionCell(org.telegram.ui.Cells.ShadowSectionCell) DrawerAddCell(org.telegram.ui.Cells.DrawerAddCell) Drawable(android.graphics.drawable.Drawable) AvatarDrawable(org.telegram.ui.Components.AvatarDrawable) MediaActionDrawable(org.telegram.ui.Components.MediaActionDrawable) PullForegroundDrawable(org.telegram.ui.Components.PullForegroundDrawable) CombinedDrawable(org.telegram.ui.Components.CombinedDrawable) MenuDrawable(org.telegram.ui.ActionBar.MenuDrawable) BitmapDrawable(android.graphics.drawable.BitmapDrawable) BackDrawable(org.telegram.ui.ActionBar.BackDrawable) ProxyDrawable(org.telegram.ui.Components.ProxyDrawable) RLottieDrawable(org.telegram.ui.Components.RLottieDrawable) TextInfoPrivacyCell(org.telegram.ui.Cells.TextInfoPrivacyCell) TextPaint(android.text.TextPaint) Paint(android.graphics.Paint) ThemeDescription(org.telegram.ui.ActionBar.ThemeDescription) ImageView(android.widget.ImageView) FilterTabsView(org.telegram.ui.Components.FilterTabsView) UndoView(org.telegram.ui.Components.UndoView) SwipeGestureSettingsView(org.telegram.ui.Components.SwipeGestureSettingsView) FragmentContextView(org.telegram.ui.Components.FragmentContextView) ScrollView(android.widget.ScrollView) FiltersView(org.telegram.ui.Adapters.FiltersView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) RLottieImageView(org.telegram.ui.Components.RLottieImageView) TextView(android.widget.TextView) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) BackupImageView(org.telegram.ui.Components.BackupImageView) FlickerLoadingView(org.telegram.ui.Components.FlickerLoadingView) NumberTextView(org.telegram.ui.Components.NumberTextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ViewPager(androidx.viewpager.widget.ViewPager) SearchViewPager(org.telegram.ui.Components.SearchViewPager) TextPaint(android.text.TextPaint) Paint(android.graphics.Paint) SuppressLint(android.annotation.SuppressLint) HashtagSearchCell(org.telegram.ui.Cells.HashtagSearchCell) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) ProfileSearchCell(org.telegram.ui.Cells.ProfileSearchCell) FragmentContextView(org.telegram.ui.Components.FragmentContextView) DrawerUserCell(org.telegram.ui.Cells.DrawerUserCell)

Example 10 with DialogCell

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

the class DialogsActivity method updateVisibleRows.

private void updateVisibleRows(int mask, boolean animated) {
    if ((dialogsListFrozen && (mask & MessagesController.UPDATE_MASK_REORDER) == 0) || isPaused) {
        return;
    }
    for (int c = 0; c < 3; c++) {
        RecyclerListView list;
        if (c == 2) {
            list = searchViewPager != null ? searchViewPager.searchListView : null;
        } else if (viewPages != null) {
            list = c < viewPages.length ? viewPages[c].listView : null;
            if (list != null && viewPages[c].getVisibility() != View.VISIBLE) {
                continue;
            }
        } else {
            continue;
        }
        if (list == null) {
            continue;
        }
        int count = list.getChildCount();
        for (int a = 0; a < count; a++) {
            View child = list.getChildAt(a);
            if (child instanceof DialogCell) {
                if (list.getAdapter() != searchViewPager.dialogsSearchAdapter) {
                    DialogCell cell = (DialogCell) child;
                    if ((mask & MessagesController.UPDATE_MASK_REORDER) != 0) {
                        cell.onReorderStateChanged(actionBar.isActionModeShowed(), true);
                        if (dialogsListFrozen) {
                            continue;
                        }
                    }
                    if ((mask & MessagesController.UPDATE_MASK_CHECK) != 0) {
                        cell.setChecked(false, (mask & MessagesController.UPDATE_MASK_CHAT) != 0);
                    } else {
                        if ((mask & MessagesController.UPDATE_MASK_NEW_MESSAGE) != 0) {
                            cell.checkCurrentDialogIndex(dialogsListFrozen);
                            if (viewPages[c].isDefaultDialogType() && AndroidUtilities.isTablet()) {
                                cell.setDialogSelected(cell.getDialogId() == openedDialogId);
                            }
                        } else if ((mask & MessagesController.UPDATE_MASK_SELECT_DIALOG) != 0) {
                            if (viewPages[c].isDefaultDialogType() && AndroidUtilities.isTablet()) {
                                cell.setDialogSelected(cell.getDialogId() == openedDialogId);
                            }
                        } else {
                            cell.update(mask, animated);
                        }
                        if (selectedDialogs != null) {
                            cell.setChecked(selectedDialogs.contains(cell.getDialogId()), false);
                        }
                    }
                }
            }
            if (child instanceof UserCell) {
                ((UserCell) child).update(mask);
            } else if (child instanceof ProfileSearchCell) {
                ProfileSearchCell cell = (ProfileSearchCell) child;
                cell.update(mask);
                if (selectedDialogs != null) {
                    cell.setChecked(selectedDialogs.contains(cell.getDialogId()), false);
                }
            }
            if (dialogsListFrozen) {
                continue;
            }
            if (child instanceof RecyclerListView) {
                RecyclerListView innerListView = (RecyclerListView) child;
                int count2 = innerListView.getChildCount();
                for (int b = 0; b < count2; b++) {
                    View child2 = innerListView.getChildAt(b);
                    if (child2 instanceof HintDialogCell) {
                        ((HintDialogCell) child2).update(mask);
                    }
                }
            }
        }
    }
}
Also used : DialogCell(org.telegram.ui.Cells.DialogCell) HintDialogCell(org.telegram.ui.Cells.HintDialogCell) HintDialogCell(org.telegram.ui.Cells.HintDialogCell) ProfileSearchCell(org.telegram.ui.Cells.ProfileSearchCell) RecyclerListView(org.telegram.ui.Components.RecyclerListView) ImageView(android.widget.ImageView) FilterTabsView(org.telegram.ui.Components.FilterTabsView) UndoView(org.telegram.ui.Components.UndoView) SwipeGestureSettingsView(org.telegram.ui.Components.SwipeGestureSettingsView) FragmentContextView(org.telegram.ui.Components.FragmentContextView) ScrollView(android.widget.ScrollView) FiltersView(org.telegram.ui.Adapters.FiltersView) View(android.view.View) RecyclerView(androidx.recyclerview.widget.RecyclerView) RLottieImageView(org.telegram.ui.Components.RLottieImageView) TextView(android.widget.TextView) ChatActivityEnterView(org.telegram.ui.Components.ChatActivityEnterView) BackupImageView(org.telegram.ui.Components.BackupImageView) FlickerLoadingView(org.telegram.ui.Components.FlickerLoadingView) NumberTextView(org.telegram.ui.Components.NumberTextView) RecyclerListView(org.telegram.ui.Components.RecyclerListView) UserCell(org.telegram.ui.Cells.UserCell) DrawerUserCell(org.telegram.ui.Cells.DrawerUserCell) TextPaint(android.text.TextPaint) Paint(android.graphics.Paint) SuppressLint(android.annotation.SuppressLint)

Aggregations

DialogCell (org.telegram.ui.Cells.DialogCell)22 View (android.view.View)19 RecyclerView (androidx.recyclerview.widget.RecyclerView)12 RecyclerListView (org.telegram.ui.Components.RecyclerListView)11 TextView (android.widget.TextView)8 FlickerLoadingView (org.telegram.ui.Components.FlickerLoadingView)8 ImageView (android.widget.ImageView)7 ArrayList (java.util.ArrayList)7 TLRPC (org.telegram.tgnet.TLRPC)7 HintDialogCell (org.telegram.ui.Cells.HintDialogCell)7 SuppressLint (android.annotation.SuppressLint)6 Paint (android.graphics.Paint)6 TextPaint (android.text.TextPaint)6 FiltersView (org.telegram.ui.Adapters.FiltersView)6 ProfileSearchCell (org.telegram.ui.Cells.ProfileSearchCell)6 Theme (org.telegram.ui.ActionBar.Theme)5 BackupImageView (org.telegram.ui.Components.BackupImageView)5 ChatActivityEnterView (org.telegram.ui.Components.ChatActivityEnterView)5 FragmentContextView (org.telegram.ui.Components.FragmentContextView)5 NumberTextView (org.telegram.ui.Components.NumberTextView)5