mirror of
https://github.com/NekoX-Dev/NekoX.git
synced 2024-12-13 22:40:07 +01:00
Don't alert "Proxy unavailable" for non-current account.
This commit is contained in:
parent
ef4de3310d
commit
58edbe46fd
@ -349,7 +349,7 @@ class Delegate : public ConnectiosManagerDelegate {
|
||||
}
|
||||
|
||||
void onProxyError(int32_t instanceNum) {
|
||||
jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onProxyError);
|
||||
jniEnv[instanceNum]->CallStaticVoidMethod(jclass_ConnectionsManager, jclass_ConnectionsManager_onProxyError, instanceNum);
|
||||
}
|
||||
|
||||
void getHostByName(std::string domain, int32_t instanceNum, ConnectionSocket *socket) {
|
||||
@ -600,7 +600,7 @@ extern "C" int registerNativeTgNetFunctions(JavaVM *vm, JNIEnv *env) {
|
||||
if (jclass_ConnectionsManager_onRequestNewServerIpAndPort == 0) {
|
||||
return JNI_FALSE;
|
||||
}
|
||||
jclass_ConnectionsManager_onProxyError = env->GetStaticMethodID(jclass_ConnectionsManager, "onProxyError", "()V");
|
||||
jclass_ConnectionsManager_onProxyError = env->GetStaticMethodID(jclass_ConnectionsManager, "onProxyError", "(I)V");
|
||||
if (jclass_ConnectionsManager_onProxyError == 0) {
|
||||
return JNI_FALSE;
|
||||
}
|
||||
|
@ -565,7 +565,9 @@ public class ConnectionsManager extends BaseController {
|
||||
});
|
||||
}
|
||||
|
||||
public static void onProxyError() {
|
||||
public static void onProxyError(int instanceNum) {
|
||||
if (UserConfig.selectedAccount != instanceNum) return;
|
||||
|
||||
AndroidUtilities.runOnUIThread(() -> {
|
||||
NotificationCenter.getGlobalInstance().postNotificationName(NotificationCenter.needShowAlert, 3);
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user