diff --git a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java index 03a6b0e00e..aaf8d54231 100644 --- a/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java +++ b/TMessagesProj/src/main/java/org/telegram/ui/LaunchActivity.java @@ -2311,7 +2311,7 @@ private boolean handleIntent(Intent intent, boolean isNew, boolean restore, bool } else if (path.startsWith("addemoji/")) { emoji = path.replace("addemoji/", ""); } else if (path.startsWith("nasettings/")) { - SettingsHelper.processDeepLink(data, fragment -> { + SettingsHelper.processDeepLink(this, data, fragment -> { AndroidUtilities.runOnUIThread(() -> presentFragment(fragment, false, false)); if (AndroidUtilities.isTablet()) { actionBarLayout.showLastFragment(); @@ -2794,7 +2794,7 @@ private boolean handleIntent(Intent intent, boolean isNew, boolean restore, bool } else if (url.startsWith("tg:neko") || url.startsWith("tg://neko")) { url = url.replace("tg:neko", "tg://t.me/nasettings").replace("tg://neko", "tg://t.me/nasettings"); data = Uri.parse(url); - SettingsHelper.processDeepLink(data, fragment -> { + SettingsHelper.processDeepLink(this, data, fragment -> { AndroidUtilities.runOnUIThread(() -> presentFragment(fragment, false, false)); if (AndroidUtilities.isTablet()) { actionBarLayout.showLastFragment(); diff --git a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/helpers/SettingsHelper.java b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/helpers/SettingsHelper.java index 943ecbc61b..d1c9e02e04 100644 --- a/TMessagesProj/src/main/java/tw/nekomimi/nekogram/helpers/SettingsHelper.java +++ b/TMessagesProj/src/main/java/tw/nekomimi/nekogram/helpers/SettingsHelper.java @@ -1,5 +1,8 @@ package tw.nekomimi.nekogram.helpers; +import static org.telegram.ui.ProfileActivity.sendLogs; + +import android.app.Activity; import android.net.Uri; import android.text.TextUtils; @@ -23,7 +26,7 @@ public class SettingsHelper { - public static void processDeepLink(Uri uri, Callback callback, Runnable unknown) { + public static void processDeepLink(Activity activity, Uri uri, Callback callback, Runnable unknown) { if (uri == null) { unknown.run(); return; @@ -65,6 +68,9 @@ public static void processDeepLink(Uri uri, Callback callback, Runnable unknown) case "g": fragment = nekox_fragment = new NekoGeneralSettingsActivity(); break; + case "send_logs": + sendLogs(activity, false); + return; default: unknown.run(); return;