Make link clickable in self profile

This commit is contained in:
世界 2021-01-12 15:37:31 +08:00
parent 149eea166b
commit 22a77a129c
No known key found for this signature in database
GPG Key ID: CD109927C34A63C4
3 changed files with 14 additions and 17 deletions

View File

@ -17271,7 +17271,7 @@ public class ChatActivity extends BaseFragment implements NotificationCenter.Not
}
}
if (shareKeyItem != null) {
if (currentChat != null && ChatObject.canSendMessages(currentChat) && shareKeyItem != null) {
if (StrUtil.isBlank(NekoConfig.openPGPApp)) {
shareKeyItem.setVisibility(View.GONE);
} else {

View File

@ -6587,18 +6587,6 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
}
detailCell.setTextAndValue(value, LocaleController.getString("Username", R.string.Username), true);
detailCell.setContentDescriptionValueFirst(true);
} else if (position == bioRow) {
String value;
if (userInfo == null || !TextUtils.isEmpty(userInfo.about)) {
value = userInfo == null ? LocaleController.getString("Loading", R.string.Loading) : userInfo.about;
detailCell.setTextWithEmojiAndValue(value, LocaleController.getString("UserBio", R.string.UserBio), false);
detailCell.setContentDescriptionValueFirst(true);
currentBio = userInfo != null ? userInfo.about : null;
} else {
detailCell.setTextAndValue(LocaleController.getString("UserBio", R.string.UserBio), LocaleController.getString("UserBioDetail", R.string.UserBioDetail), false);
detailCell.setContentDescriptionValueFirst(false);
currentBio = null;
}
}
break;
case 3:
@ -6611,6 +6599,16 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
text = text.replace("\n\n\n", "\n\n");
}
aboutLinkCell.setText(text, true);
} else if (position == bioRow) {
String value;
if (userInfo == null || !TextUtils.isEmpty(userInfo.about)) {
value = userInfo == null ? LocaleController.getString("Loading", R.string.Loading) : userInfo.about;
aboutLinkCell.setTextAndValue(value, LocaleController.getString("UserBio", R.string.UserBio), false);
currentBio = userInfo != null ? userInfo.about : null;
} else {
aboutLinkCell.setTextAndValue( LocaleController.getString("UserBioDetail", R.string.UserBioDetail), LocaleController.getString("UserBio", R.string.UserBio), false);
currentBio = null;
}
}
break;
case 4:
@ -6848,9 +6846,9 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
position == numberSectionRow || position == helpHeaderRow || position == debugHeaderRow) {
return 1;
} else if (position == phoneRow || position == usernameRow || position == locationRow ||
position == numberRow || position == setUsernameRow || position == bioRow) {
position == numberRow || position == setUsernameRow ) {
return 2;
} else if (position == userInfoRow || position == channelInfoRow) {
} else if (position == userInfoRow || position == channelInfoRow || position == bioRow) {
return 3;
} else if (position == notificationsDividerRow) {
return 5;

View File

@ -242,8 +242,7 @@ public class NekoExperimentalSettingsActivity extends BaseFragment {
if (view instanceof TextCheckCell) {
((TextCheckCell) view).setChecked(NekoConfig.increaseVoiceMessageQuality);
}
tooltip.setInfoText(LocaleController.formatString("RestartAppToTakeEffect", R.string.RestartAppToTakeEffect));
tooltip.showWithAction(0, UndoView.ACTION_CACHE_WAS_CLEARED, null, null);
tooltip.showWithAction(0, UndoView.ACTION_NEED_RESATRT, null, null);
}
});