fix: Show Full About
This commit is contained in:
parent
6a72f3a957
commit
99956e9b0c
@ -182,12 +182,12 @@ public class AboutLinkCell extends FrameLayout {
|
||||
);
|
||||
showMoreTextBackgroundView.addView(showMoreTextView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT));
|
||||
addView(showMoreTextBackgroundView, LayoutHelper.createFrame(LayoutHelper.WRAP_CONTENT, LayoutHelper.WRAP_CONTENT, Gravity.RIGHT | Gravity.BOTTOM, 22 - showMoreTextBackgroundView.getPaddingLeft() / AndroidUtilities.density, 0, 22 - showMoreTextBackgroundView.getPaddingRight() / AndroidUtilities.density, 6));
|
||||
if (NaConfig.INSTANCE.getShowFullAbout().Bool()) {
|
||||
updateCollapse(true, true);
|
||||
}
|
||||
backgroundPaint.setColor(Theme.getColor(Theme.key_windowBackgroundWhite, resourcesProvider));
|
||||
|
||||
setWillNotDraw(false);
|
||||
if (NaConfig.INSTANCE.getShowFullAbout().Bool()) {
|
||||
onClick();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -3341,49 +3341,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
|
||||
if (userInfo != null) {
|
||||
presentFragment(new ChangeBioActivity());
|
||||
}
|
||||
} else if (position == channelInfoRow || position == userInfoRow || position == locationRow) {
|
||||
if (aboutLinkCell != null && !aboutLinkCell.isExpanded()) {
|
||||
aboutLinkCell.updateCollapse(true, true);
|
||||
} else {
|
||||
BottomBuilder builder = new BottomBuilder(getParentActivity());
|
||||
builder.addItem(LocaleController.getString("Copy", R.string.Copy), R.drawable.msg_copy, __ -> {
|
||||
try {
|
||||
String about;
|
||||
if (position == locationRow) {
|
||||
about = chatInfo != null && chatInfo.location instanceof TLRPC.TL_channelLocation ? ((TLRPC.TL_channelLocation) chatInfo.location).address : null;
|
||||
} else if (position == channelInfoRow) {
|
||||
about = chatInfo != null ? chatInfo.about : null;
|
||||
} else {
|
||||
about = userInfo != null ? userInfo.about : null;
|
||||
}
|
||||
if (!TextUtils.isEmpty(about)) {
|
||||
AlertUtil.copyAndAlert(about);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e(e);
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
});
|
||||
builder.addItem(LocaleController.getString("Translate", R.string.Translate), R.drawable.ic_translate, __ -> {
|
||||
try {
|
||||
String about;
|
||||
if (position == locationRow) {
|
||||
about = chatInfo != null && chatInfo.location instanceof TLRPC.TL_channelLocation ? ((TLRPC.TL_channelLocation) chatInfo.location).address : null;
|
||||
} else if (position == channelInfoRow) {
|
||||
about = chatInfo != null ? chatInfo.about : null;
|
||||
} else {
|
||||
about = userInfo != null ? userInfo.about : null;
|
||||
}
|
||||
if (!TextUtils.isEmpty(about)) {
|
||||
DialogTransKt.startTrans(getParentActivity(), about);
|
||||
}
|
||||
} catch (Exception e) {
|
||||
FileLog.e(e);
|
||||
}
|
||||
return Unit.INSTANCE;
|
||||
});
|
||||
builder.show();
|
||||
}
|
||||
} else if (position == numberRow) {
|
||||
TLRPC.User user = UserConfig.getInstance(currentAccount).getCurrentUser();
|
||||
String number;
|
||||
@ -9099,7 +9056,7 @@ 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);
|
||||
aboutLinkCell.setMoreButtonDisabled(true);
|
||||
}
|
||||
break;
|
||||
case VIEW_TYPE_PREMIUM_TEXT_CELL:
|
||||
|
Loading…
Reference in New Issue
Block a user