Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
LiuYi0526 committed May 4, 2024
2 parents 69811d4 + 1289ec6 commit 7621379
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
import java.util.List;
import java.util.regex.Matcher;

import xyz.nextalone.nagram.NaConfig;

public class Browser {

private static WeakReference<CustomTabsSession> customTabsCurrentSession;
Expand Down Expand Up @@ -322,7 +324,7 @@ public static void openUrl(final Context context, Uri uri, final boolean allowCu
}
}
String host = AndroidUtilities.getHostAuthority(uri.toString().toLowerCase());
if (AccountInstance.getInstance(currentAccount).getMessagesController().autologinDomains.contains(host)) {
if (AccountInstance.getInstance(currentAccount).getMessagesController().autologinDomains.contains(host) && !NaConfig.INSTANCE.getDisableAutoWebLogin().Bool()) {
String token = "autologin_token=" + URLEncoder.encode(AccountInstance.getInstance(UserConfig.selectedAccount).getMessagesController().autologinToken, "UTF-8");
String url = uri.toString();
int idx = url.indexOf("://");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6289,6 +6289,7 @@ public static void createDeleteMessagesAlert(BaseFragment fragment, TLRPC.User u
FrameLayout frameLayout = new FrameLayout(activity);
CheckBoxCell cell = new CheckBoxCell(activity, 1, resourcesProvider);
cell.setBackgroundDrawable(Theme.getSelectorDrawable(false));
deleteForAll[0] = true;
if (canDeleteInbox) {
cell.setText(LocaleController.formatString("DeleteMessagesOptionAlso", R.string.DeleteMessagesOptionAlso, UserObject.getFirstName(user)), "", true, false);
} else if (chat != null && (hasNotOut || myMessagesCount == count)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ public class NekoGeneralSettingsActivity extends BaseNekoXSettingsActivity {
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 disableAutoWebLoginRow = cellGroup.appendCell(new ConfigCellTextCheck(NaConfig.INSTANCE.getDisableAutoWebLogin()));
private final AbstractConfigCell divider6 = cellGroup.appendCell(new ConfigCellDivider());

private final AbstractConfigCell header7 = cellGroup.appendCell(new ConfigCellHeader(LocaleController.getString("General")));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,12 @@ object NaConfig {
ConfigItem.configTypeBool,
false
)
val disableAutoWebLogin =
addConfig(
"DisableAutoWebLogin",
ConfigItem.configTypeBool,
false
)

private fun addConfig(
k: String,
Expand Down
1 change: 1 addition & 0 deletions TMessagesProj/src/main/res/values-zh-rCN/strings_na.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,5 @@
<string name="DisableChannelMuteButton">禁用频道聊天页面的静音按钮</string>
<string name="DisablePreviewVideoSoundShortcut">禁用预览视频音量快捷键</string>
<string name="DisablePreviewVideoSoundShortcutNotice">禁用音量键快捷开启预览视频的声音</string>
<string name="DisableAutoWebLogin">禁用官方网页自动登录</string>
</resources>
1 change: 1 addition & 0 deletions TMessagesProj/src/main/res/values/strings_na.xml
Original file line number Diff line number Diff line change
Expand Up @@ -140,4 +140,5 @@
<string name="DisableChannelMuteButton">Disable channel mute button</string>
<string name="DisablePreviewVideoSoundShortcut">Disable preview video sound shortcut</string>
<string name="DisablePreviewVideoSoundShortcutNotice">Disable volume keys to enable preview video sound</string>
<string name="DisableAutoWebLogin">Disable auto web login</string>
</resources>

0 comments on commit 7621379

Please sign in to comment.