diff --git a/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java index 0dff262a4..b6e1442c8 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java @@ -519,13 +519,13 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. if (filterTabsView != null && filterTabsView.getVisibility() == VISIBLE) { h = heightSize - inputFieldHeight + AndroidUtilities.dp(2) - AndroidUtilities.dp(44) - topPadding; } else { - h = heightSize - inputFieldHeight + AndroidUtilities.dp(2) - (onlySelect ? 0 : actionBar.getMeasuredHeight()) - topPadding; + h = heightSize - inputFieldHeight + AndroidUtilities.dp(2) - ((onlySelect && !(initialDialogsType == 3 && NekoConfig.showTabsOnForward)) ? 0 : actionBar.getMeasuredHeight()) - topPadding; } child.measure(contentWidthSpec, View.MeasureSpec.makeMeasureSpec(Math.max(AndroidUtilities.dp(10), h), View.MeasureSpec.EXACTLY)); child.setPivotX(child.getMeasuredWidth() / 2); } else if (child == searchListView || child == searchEmptyView) { int contentWidthSpec = View.MeasureSpec.makeMeasureSpec(widthSize, View.MeasureSpec.EXACTLY); - int contentHeightSpec = View.MeasureSpec.makeMeasureSpec(Math.max(AndroidUtilities.dp(10), heightSize - inputFieldHeight + AndroidUtilities.dp(2) - (onlySelect ? 0 : actionBar.getMeasuredHeight()) - topPadding), View.MeasureSpec.EXACTLY); + int contentHeightSpec = View.MeasureSpec.makeMeasureSpec(Math.max(AndroidUtilities.dp(10), heightSize - inputFieldHeight + AndroidUtilities.dp(2) - (onlySelect && !(initialDialogsType == 3 && NekoConfig.showTabsOnForward) ? 0 : actionBar.getMeasuredHeight()) - topPadding), View.MeasureSpec.EXACTLY); child.measure(contentWidthSpec, contentHeightSpec); child.setPivotX(child.getMeasuredWidth() / 2); } else if (commentView != null && commentView.isPopupView(child)) { @@ -1525,16 +1525,16 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter. AndroidUtilities.runOnUIThread(() -> Theme.createChatResources(context, false)); ActionBarMenu menu = actionBar.createMenu(); + doneItem = new ActionBarMenuItem(context, null, Theme.getColor(Theme.key_actionBarDefaultSelector), Theme.getColor(Theme.key_actionBarDefaultIcon), true); + doneItem.setText(LocaleController.getString("Done", R.string.Done).toUpperCase()); + actionBar.addView(doneItem, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.RIGHT, 0, 0, 10, 0)); + doneItem.setOnClickListener(v -> { + filterTabsView.setIsEditing(false); + showDoneItem(false); + }); + doneItem.setAlpha(0.0f); + doneItem.setVisibility(View.GONE); if (!onlySelect && searchString == null && folderId == 0) { - doneItem = new ActionBarMenuItem(context, null, Theme.getColor(Theme.key_actionBarDefaultSelector), Theme.getColor(Theme.key_actionBarDefaultIcon), true); - doneItem.setText(LocaleController.getString("Done", R.string.Done).toUpperCase()); - actionBar.addView(doneItem, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.TOP | Gravity.RIGHT, 0, 0, 10, 0)); - doneItem.setOnClickListener(v -> { - filterTabsView.setIsEditing(false); - showDoneItem(false); - }); - doneItem.setAlpha(0.0f); - doneItem.setVisibility(View.GONE); proxyDrawable = new ProxyDrawable(context); proxyItem = menu.addItem(2, proxyDrawable); proxyItem.setContentDescription(LocaleController.getString("ProxySettings", R.string.ProxySettings));