diff --git a/TMessagesProj/src/main/java/org/telegram/ui/Cells/HeaderCell.java b/TMessagesProj/src/main/java/org/telegram/ui/Cells/HeaderCell.java index 561cd8b2b..fc955541c 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/Cells/HeaderCell.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/Cells/HeaderCell.java @@ -67,9 +67,6 @@ public class HeaderCell extends LinearLayout { super(context); this.resourcesProvider = resourcesProvider; - setOrientation(LinearLayout.VERTICAL); - setPadding(AndroidUtilities.dp(padding), AndroidUtilities.dp(topMargin), AndroidUtilities.dp(padding), 0); - textView = new TextView(getContext()); textView.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 15); textView.setTypeface(AndroidUtilities.getTypeface("fonts/rmedium.ttf")); @@ -107,7 +104,7 @@ public class HeaderCell extends LinearLayout { } public void setHeight(int value) { - textView.setMinHeight(AndroidUtilities.dp(value) - ((LayoutParams) textView.getLayoutParams()).topMargin); + textView.setMinHeight(AndroidUtilities.dp(height = value) - ((LayoutParams) textView.getLayoutParams()).topMargin); } public void setEnabled(boolean value, ArrayList animators) { diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java index 5bbbfb521..9c8794a1f 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ChatActivity.java @@ -2949,7 +2949,7 @@ ChatActivity extends BaseFragment implements NotificationCenter.NotificationCent TLRPC.UserFull userFull = null; if (currentUser != null) { // audioCallIconItem = menu.addItem(call, R.drawable.ic_call, themeDelegate); - audioCallIconItem.setContentDescription(LocaleController.getString("Call", R.string.Call)); +// audioCallIconItem.setContentDescription(LocaleController.getString("Call", R.string.Call)); userFull = getMessagesController().getUserFull(currentUser.id); // if (userFull != null && userFull.phone_calls_available) { // showAudioCallAsIcon = !inPreviewMode; diff --git a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java index 580eeec25..415d1a205 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/ProfileActivity.java @@ -434,8 +434,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. private int privacyRow; private int dataRow; private int chatRow; - private int stickersRow; private int filtersRow; + private int stickersRow; private int devicesRow; private int devicesSectionRow; private int helpHeaderRow; @@ -3136,6 +3136,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. }); showDialog(builder.create()); } else if (position == setAvatarRow) { + onWriteButtonClick(); } else if (position == versionRow) { TextInfoPrivacyCell cell = (TextInfoPrivacyCell) view; @@ -4515,9 +4516,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. showDialog(builder.create()); return true; } else if (position == channelInfoRow || position == userInfoRow || position == locationRow || position == bioRow) { - if (position == bioRow) { - presentFragment(new ChangeBioActivity()); - return true; + if (position == bioRow && (userInfo == null || TextUtils.isEmpty(userInfo.about))) { + return false; } if (view instanceof AboutLinkCell && ((AboutLinkCell) view).onClick()) { return false; @@ -6315,7 +6315,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. privacyRow = -1; dataRow = -1; chatRow = -1; - stickersRow = -1; filtersRow = -1; stickersRow = -1; devicesRow = -1; @@ -8030,6 +8029,16 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. aboutLinkCell.setTextAndValue(LocaleController.getString("UserBioDetail", R.string.UserBioDetail), LocaleController.getString("UserBio", R.string.UserBio), false); currentBio = null; } +// aboutLinkCell.setMoreButtonDisabled(true); + } + if (position == bioRow) { + aboutLinkCell.setOnClickListener(e -> { + if (userInfo != null) { + presentFragment(new ChangeBioActivity()); + } + }); + } else { + aboutLinkCell.setOnClickListener(e -> processOnClickOrPress(position, aboutLinkCell)); } break; case VIEW_TYPE_PREMIUM_TEXT_CELL: @@ -8129,6 +8138,8 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter. textCell.setTextAndIcon(LocaleController.getString("DebugClearLogs", R.string.DebugClearLogs), R.drawable.baseline_delete_sweep_24, switchBackendRow != -1); } else if (position == switchBackendRow) { textCell.setText("Switch Backend", false); + } else if (position == devicesRow) { + textCell.setTextAndIcon(LocaleController.getString("Devices", R.string.Devices), R.drawable.menu_devices, true); } else if (position == setAvatarRow) { textCell.setTextAndIcon(LocaleController.getString("SetProfilePhoto", R.string.SetProfilePhoto), R.drawable.baseline_image_24, false); textCell.setColors(Theme.key_windowBackgroundWhiteBlueIcon, Theme.key_windowBackgroundWhiteBlueButton);