Skip to content

Commit

Permalink
Fix cannot scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
satouriko authored and NekoInverter committed Apr 11, 2020
1 parent 8e94ff4 commit 61873b5
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions TMessagesProj/src/main/java/org/telegram/ui/DialogsActivity.java
Original file line number Diff line number Diff line change
Expand Up @@ -519,13 +519,13 @@ protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
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)) {
Expand Down Expand Up @@ -1525,16 +1525,16 @@ public View createView(final Context context) {
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));
Expand Down

0 comments on commit 61873b5

Please sign in to comment.