feat: disable profile suggestion
This commit is contained in:
parent
4fe34c2d4a
commit
06cb8af78b
@ -2772,6 +2772,10 @@ public class MessagesController extends BaseController implements NotificationCe
|
||||
break;
|
||||
}
|
||||
case "pending_suggestions": {
|
||||
if (NaConfig.INSTANCE.getDisableSuggestionView().Bool()) {
|
||||
pendingSuggestions = new HashSet<>();
|
||||
break;
|
||||
}
|
||||
HashSet<String> newSuggestions = new HashSet<>();
|
||||
if (value.value instanceof TLRPC.TL_jsonArray) {
|
||||
TLRPC.TL_jsonArray array = (TLRPC.TL_jsonArray) value.value;
|
||||
|
@ -1135,7 +1135,6 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
|
||||
if (!ChatObject.hasAdminRights(currentChat)) {
|
||||
// infoContainer.setVisibility(View.GONE);
|
||||
// settingsTopSectionCell.setVisibility(View.GONE);
|
||||
if (logCell != null) logCell.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
if (stickersCell == null) {
|
||||
@ -1929,6 +1928,8 @@ public class ChatEditActivity extends BaseFragment implements ImageUpdater.Image
|
||||
if (stickersCell != null && info != null) {
|
||||
stickersCell.setTextAndValue(LocaleController.getString(R.string.GroupStickers), info.stickerset != null ? info.stickerset.title : LocaleController.getString(R.string.Add), false);
|
||||
}
|
||||
|
||||
if (logCell != null && !ChatObject.hasAdminRights(currentChat)) logCell.setVisibility(View.GONE);
|
||||
}
|
||||
|
||||
private ValueAnimator updateHistoryShowAnimator;
|
||||
|
@ -272,6 +272,7 @@ import tw.nekomimi.nekogram.utils.LangsKt;
|
||||
import tw.nekomimi.nekogram.utils.ProxyUtil;
|
||||
import tw.nekomimi.nekogram.utils.ShareUtil;
|
||||
import tw.nekomimi.nekogram.utils.UIUtil;
|
||||
import xyz.nextalone.nagram.NaConfig;
|
||||
import xyz.nextalone.nagram.helper.MessageHelper;
|
||||
|
||||
public class ProfileActivity extends BaseFragment implements NotificationCenter.NotificationCenterDelegate, DialogsActivity.DialogsActivityDelegate, SharedMediaLayout.SharedMediaPreloaderDelegate, ImageUpdater.ImageUpdaterDelegate, SharedMediaLayout.Delegate {
|
||||
|
@ -206,6 +206,7 @@ public class NekoGeneralSettingsActivity extends BaseNekoXSettingsActivity {
|
||||
private final AbstractConfigCell header6 = cellGroup.appendCell(new ConfigCellHeader(LocaleController.getString("PrivacyTitle")));
|
||||
private final AbstractConfigCell disableSystemAccountRow = cellGroup.appendCell(new ConfigCellTextCheck(NekoConfig.disableSystemAccount));
|
||||
private final AbstractConfigCell doNotShareMyPhoneNumberRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDoNotShareMyPhoneNumber()));
|
||||
private final AbstractConfigCell disableSuggestionViewRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableSuggestionView()));
|
||||
private final AbstractConfigCell divider6 = cellGroup.appendCell(new ConfigCellDivider());
|
||||
|
||||
private final AbstractConfigCell header7 = cellGroup.appendCell(new ConfigCellHeader(LocaleController.getString("General")));
|
||||
|
@ -418,6 +418,12 @@ object NaConfig {
|
||||
ConfigItem.configTypeInt,
|
||||
0
|
||||
)
|
||||
val disableSuggestionView =
|
||||
addConfig(
|
||||
"DisableSuggestionView",
|
||||
ConfigItem.configTypeBool,
|
||||
false
|
||||
)
|
||||
|
||||
private fun addConfig(
|
||||
k: String,
|
||||
|
@ -85,4 +85,5 @@
|
||||
<string name="DoNotUnarchiveBySwipe">禁用滑动取消归档</string>
|
||||
<string name="DoNotShareMyPhoneNumber">禁用分享我的手机号码</string>
|
||||
<string name="DefaultDeleteMenu">默认删除菜单</string>
|
||||
<string name="DisableSuggestionView">禁用修改手机号码的建议</string>
|
||||
</resources>
|
||||
|
@ -88,4 +88,5 @@
|
||||
<string name="DoNotUnarchiveBySwipe">Do not unarchive by swipe</string>
|
||||
<string name="DoNotShareMyPhoneNumber">Do not share my phone number</string>
|
||||
<string name="DefaultDeleteMenu">Default Delete Menu</string>
|
||||
<string name="DisableSuggestionView">Disable Profile Settings Suggestion</string>
|
||||
</resources>
|
||||
|
Loading…
Reference in New Issue
Block a user