From 6ab67597543c293201c51b9ebe7733b91d7e627c Mon Sep 17 00:00:00 2001 From: omg-xtao <100690902+omg-xtao@users.noreply.github.com> Date: Mon, 15 Jan 2024 14:52:15 +0800 Subject: [PATCH] chore: change nasettings to nnnsettings --- .../src/main/java/org/telegram/ui/LaunchActivity.java | 4 ++-- .../java/xyz/nextalone/nnngram/activity/BaseActivity.java | 2 +- .../nextalone/nnngram/activity/PasscodeSettingActivity.java | 2 +- .../java/xyz/nextalone/nnngram/helpers/SettingsHelper.java | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java index 1e0c372eed..164e713857 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java @@ -2172,7 +2172,7 @@ private boolean handleIntent(Intent intent, boolean isNew, boolean restore, bool } } else if (path.startsWith("addstickers/")) { sticker = path.replace("addstickers/", ""); - } else if (path.startsWith("nasettings/")) { + } else if (path.startsWith("nnnsettings/")) { SettingsHelper.processDeepLink(data, fragment -> { AndroidUtilities.runOnUIThread(() -> presentFragment(fragment, false, false)); if (AndroidUtilities.isTablet()) { @@ -2625,7 +2625,7 @@ private boolean handleIntent(Intent intent, boolean isNew, boolean restore, bool } else if ((url.startsWith("tg:calllog") || url.startsWith("tg://calllog"))) { showCallLog = true; } else if (url.startsWith("tg:null") || url.startsWith("tg://null")) { - url = url.replace("tg:null", "tg://t.me/nasettings").replace("tg://null", "tg://t.me/nasettings"); + url = url.replace("tg:null", "tg://t.me/nnnsettings").replace("tg://null", "tg://t.me/nnnsettings"); data = Uri.parse(url); SettingsHelper.processDeepLink(data, fragment -> { AndroidUtilities.runOnUIThread(() -> presentFragment(fragment, false, false)); diff --git a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/BaseActivity.java b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/BaseActivity.java index 0e1bc8bf3f..2711d80186 100644 --- a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/BaseActivity.java +++ b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/BaseActivity.java @@ -166,7 +166,7 @@ public void onScrolled(@NonNull RecyclerView recyclerView, int dx, int dy) { if (key != null && holder != null && listAdapter.isEnabled(holder) && rowMapReverse.containsKey(position)) { showDialog(new AlertDialog.Builder(context).setItems(new CharSequence[]{LocaleController.getString("CopyLink", R.string.CopyLink)}, (dialogInterface, i) -> { AndroidUtilities.addToClipboard( - String.format(Locale.getDefault(), "https://%s/nasettings/%s?r=%s", getMessagesController().linkPrefix, getKey(), rowMapReverse.get(position))); + String.format(Locale.getDefault(), "https://%s/nnnsettings/%s?r=%s", getMessagesController().linkPrefix, getKey(), rowMapReverse.get(position))); BulletinFactory.of(BaseActivity.this).createCopyLinkBulletin().show(); }).create()); return true; diff --git a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/PasscodeSettingActivity.java b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/PasscodeSettingActivity.java index f4bd68952e..618034622d 100644 --- a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/PasscodeSettingActivity.java +++ b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/activity/PasscodeSettingActivity.java @@ -308,7 +308,7 @@ public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) { cell.setBackground(Theme.getThemedDrawable(mContext, R.drawable.greydivider_bottom, Theme.key_windowBackgroundGrayShadow)); } } else if (position == showInSettings2Row) { - var link = String.format(Locale.ENGLISH, "https://t.me/nasettings/%s", PasscodeHelper.getSettingsKey()); + var link = String.format(Locale.ENGLISH, "https://t.me/nnnsettings/%s", PasscodeHelper.getSettingsKey()); var stringBuilder = new SpannableStringBuilder(AndroidUtilities.replaceTags(LocaleController.getString("PasscodeShowInSettingsAbout", R.string.PasscodeShowInSettingsAbout))); stringBuilder.append("\n").append(link); stringBuilder.setSpan(new URLSpanNoUnderline(null) { diff --git a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/helpers/SettingsHelper.java b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/helpers/SettingsHelper.java index d332652087..b563f39580 100644 --- a/TMessagesProj/src/main/java/xyz/nextalone/nnngram/helpers/SettingsHelper.java +++ b/TMessagesProj/src/main/java/xyz/nextalone/nnngram/helpers/SettingsHelper.java @@ -40,7 +40,7 @@ public static void processDeepLink(Uri uri, Callback callback, Runnable unknown) return; } var segments = uri.getPathSegments(); - if (segments.isEmpty() || segments.size() > 2 || !"nasettings".equals(segments.get(0))) { + if (segments.isEmpty() || segments.size() > 2 || !"nnnsettings".equals(segments.get(0))) { unknown.run(); return; }