mirror of https://github.com/NekoX-Dev/NekoX.git
fix proxy item view
This commit is contained in:
parent
2211b5f8a7
commit
0f8beeadb5
|
@ -11,10 +11,10 @@ configurations {
|
|||
compile.exclude module: 'support-v4'
|
||||
}
|
||||
|
||||
def okHttpVersion = '4.6.0'
|
||||
def fcmVersion = '20.1.7'
|
||||
def okHttpVersion = '4.7.2'
|
||||
def fcmVersion = '20.2.0'
|
||||
def crashlyticsVersion = '17.0.0'
|
||||
def playCoreVersion = '1.7.2'
|
||||
def playCoreVersion = '1.7.3'
|
||||
|
||||
buildscript {
|
||||
|
||||
|
@ -34,7 +34,7 @@ buildscript {
|
|||
|
||||
dependencies {
|
||||
|
||||
implementation 'androidx.core:core:1.3.0-rc01'
|
||||
implementation 'androidx.core:core:1.4.0-alpha01'
|
||||
implementation 'androidx.palette:palette:1.0.0'
|
||||
implementation 'androidx.viewpager:viewpager:1.0.0'
|
||||
implementation 'androidx.exifinterface:exifinterface:1.2.0'
|
||||
|
@ -49,14 +49,13 @@ dependencies {
|
|||
implementation 'org.osmdroid:osmdroid-android:6.1.6'
|
||||
implementation 'com.google.zxing:core:3.4.0'
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.3.72"
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.6'
|
||||
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.7'
|
||||
|
||||
implementation "com.squareup.okhttp3:okhttp:$okHttpVersion"
|
||||
implementation "com.squareup.okhttp3:okhttp-dnsoverhttps:$okHttpVersion"
|
||||
implementation 'dnsjava:dnsjava:3.1.0'
|
||||
implementation 'org.dizitart:nitrite:3.4.1'
|
||||
implementation 'net.lingala.zip4j:zip4j:2.5.2'
|
||||
implementation 'net.lingala.zip4j:zip4j:2.6.0'
|
||||
|
||||
implementation "cn.hutool:hutool-core:5.3.5"
|
||||
implementation "cn.hutool:hutool-crypto:5.3.5"
|
||||
|
|
|
@ -223,6 +223,13 @@ public class ApplicationLoader extends Application {
|
|||
e.printStackTrace();
|
||||
}
|
||||
|
||||
try {
|
||||
EnvUtil.doTest();
|
||||
} catch (Exception e) {
|
||||
FileLog.e("EnvUtil test Failed", e);
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
try {
|
||||
|
@ -347,16 +354,6 @@ public class ApplicationLoader extends Application {
|
|||
|
||||
startPushService();
|
||||
|
||||
try {
|
||||
|
||||
EnvUtil.doTest();
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
FileLog.e("EnvUtil test Failed", e);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static void startPushService() {
|
||||
|
|
|
@ -1592,7 +1592,7 @@ public class DialogsActivity extends BaseFragment implements NotificationCenter.
|
|||
if (switchItem != null) {
|
||||
switchItem.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (proxyItem != null) {
|
||||
if (proxyItem != null && proxyItemVisible) {
|
||||
proxyItem.setVisibility(View.VISIBLE);
|
||||
}
|
||||
if (scanItem != null) {
|
||||
|
|
|
@ -27,7 +27,6 @@ import android.widget.FrameLayout;
|
|||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.core.app.NotificationManagerCompat;
|
||||
import androidx.recyclerview.widget.LinearLayoutManager;
|
||||
import androidx.recyclerview.widget.RecyclerView;
|
||||
|
||||
|
@ -44,7 +43,6 @@ import org.telegram.messenger.R;
|
|||
import org.telegram.messenger.SharedConfig;
|
||||
import org.telegram.messenger.UserConfig;
|
||||
import org.telegram.messenger.Utilities;
|
||||
import org.telegram.messenger.XiaomiUtilities;
|
||||
import org.telegram.tgnet.ConnectionsManager;
|
||||
import org.telegram.tgnet.TLRPC;
|
||||
import org.telegram.ui.ActionBar.ActionBar;
|
||||
|
@ -65,7 +63,6 @@ import org.telegram.ui.Components.RecyclerListView;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
import java.util.Set;
|
||||
|
||||
import tw.nekomimi.nekogram.utils.AlertUtil;
|
||||
|
||||
|
@ -580,27 +577,13 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
|||
}
|
||||
}
|
||||
} else if (position == notificationsServiceRow) {
|
||||
if (XiaomiUtilities.isMIUI() && !XiaomiUtilities.isCustomPermissionGranted(XiaomiUtilities.OP_AUTO_START)) {
|
||||
AlertDialog.Builder builder = new AlertDialog.Builder(context);
|
||||
builder.setTitle(LocaleController.getString("NekoX",R.string.NekoX));
|
||||
builder.setMessage(LocaleController.getString("MIUIPermissionNote",R.string.MIUIPermissionNote));
|
||||
builder.setPositiveButton(LocaleController.getString("OK",R.string.OK),(_x,_y) -> {
|
||||
|
||||
getParentActivity().startActivity(XiaomiUtilities.getPermissionManagerIntent());
|
||||
|
||||
});
|
||||
builder.setNegativeButton(LocaleController.getString("Cancel",R.string.Cancel),null);
|
||||
builder.show();
|
||||
return;
|
||||
}
|
||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN_MR2) {
|
||||
if (openNotificationListenSettings()) {
|
||||
if (ApplicationLoader.isNotificationListenerEnabled()) {
|
||||
AlertUtil.showToast( LocaleController.getString("DisablePushAlert", R.string.DisablePushAlert));
|
||||
AlertUtil.showToast(LocaleController.getString("DisablePushAlert", R.string.DisablePushAlert));
|
||||
} else {
|
||||
AlertUtil.showToast(LocaleController.getString("EnablePushAlert", R.string.EnablePushAlert));
|
||||
}
|
||||
}
|
||||
AndroidUtilities.runOnUIThread(this::openNotificationListenSettings, 500L);
|
||||
} else {
|
||||
SharedPreferences preferences = MessagesController.getNotificationsSettings(currentAccount);
|
||||
enabled = preferences.getBoolean("pushService", getMessagesController().keepAliveService);
|
||||
|
@ -679,7 +662,7 @@ public class NotificationsSettingsActivity extends BaseFragment implements Notif
|
|||
getParentActivity().startActivity(intent);
|
||||
return true;
|
||||
} catch (Exception ex) {
|
||||
AlertsCreator.showSimpleToast(this,"Open NotificationAccessSettings Error");
|
||||
AlertsCreator.showSimpleToast(this, "Open NotificationAccessSettings Error");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
|
|
|
@ -116,8 +116,6 @@
|
|||
<string name="EnablePushAlert">Please enable "NekoX Push Service"</string>
|
||||
<string name="DisablePushAlert">Please disable "NekoX Push Service"</string>
|
||||
|
||||
<string name="MIUIPermissionNote">For MIUI users, please enable auto-start permission for NekoX to receive notifications normally.</string>
|
||||
|
||||
<string name="DisableUndo">Disable Undo</string>
|
||||
<string name="DisableSystemAccount">Disable System Account</string>
|
||||
<string name="FilterMenu">Dialogs Filter Menu</string>
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
#Sat May 09 19:09:10 CST 2020
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4.1-all.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.4-all.zip
|
||||
|
|
Loading…
Reference in New Issue