1
0
mirror of https://github.com/NekoX-Dev/NekoX.git synced 2024-12-12 11:39:49 +01:00

Delete residentNotification

It's useless.
This commit is contained in:
arm64v8a 2021-11-17 21:06:07 +08:00
parent 1081f036c3
commit 158fc41032
3 changed files with 1 additions and 29 deletions

View File

@ -31,31 +31,6 @@ public class NotificationsService extends Service {
public void onCreate() {
super.onCreate();
ApplicationLoader.postInitApplication();
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
String CHANNEL_ID = "push_service_channel";
NotificationChannel channel = new NotificationChannel(CHANNEL_ID, LocaleController.getString("PlaceHolder", R.string.PlaceHolder), NotificationManager.IMPORTANCE_DEFAULT);
channel.setDescription("NekoX - System");
channel.enableLights(false);
channel.enableVibration(false);
channel.setSound(null, null);
NotificationManager notificationManager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);
if (notificationManager != null) {
notificationManager.createNotificationChannel(channel);
}
Intent intent = new Intent(Settings.ACTION_CHANNEL_NOTIFICATION_SETTINGS);
intent.putExtra(Settings.EXTRA_APP_PACKAGE, getPackageName());
intent.putExtra(Settings.EXTRA_CHANNEL_ID, CHANNEL_ID);
PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, intent, 0);
Notification notification = new NotificationCompat.Builder(this, CHANNEL_ID)
.setSmallIcon(R.drawable.notification)
.setColor(NekoConfig.getNotificationColor())
.setContentTitle(LocaleController.getString("NekogramRunning", R.string.NekogramRunning))
.setContentText(LocaleController.getString("TapToDisable",R.string.TapToDisable))
.setContentIntent(pendingIntent)
.setCategory(NotificationCompat.CATEGORY_STATUS)
.build();
startForeground(38264, notification);
}
}
@Override

View File

@ -3105,7 +3105,7 @@ public class ProfileActivity extends BaseFragment implements NotificationCenter.
} else if (which == 7) {
VoIPHelper.showCallDebugSettings(getParentActivity());
} else if (which == 8) {
NekomuraConfig.residentNotification.toggleConfigBool();
SharedConfig.toggleRoundCamera16to9();
} else if (which == 9) {
} else if (which == 10) {
getMessagesStorage().readAllDialogs(-1);

View File

@ -58,7 +58,6 @@ public class NekomuraConfig {
public static ConfigItem nameOrder = addConfig("NameOrder", configTypeInt, 1);
public static ConfigItem mapPreviewProvider = addConfig("MapPreviewProvider", configTypeInt, 0);
public static ConfigItem transparentStatusBar = addConfig("TransparentStatusBar", configTypeBool, false);
public static ConfigItem residentNotification = addConfig("EnableResidentNotification", configTypeBool, false);
public static ConfigItem hideProxySponsorChannel = addConfig("HideProxySponsorChannel", configTypeBool, false);
public static ConfigItem showAddToSavedMessages = addConfig("showAddToSavedMessages", configTypeBool, true);
public static ConfigItem showReport = addConfig("showReport", configTypeBool, true);
@ -320,8 +319,6 @@ public class NekomuraConfig {
mapPreviewProvider.setConfigInt(preferences.getInt("mapPreviewProvider", 0));
if (preferences.contains("transparentStatusBar"))
transparentStatusBar.setConfigBool(preferences.getBoolean("transparentStatusBar", false));
if (preferences.contains("residentNotification"))
residentNotification.setConfigBool(preferences.getBoolean("residentNotification", false));
if (preferences.contains("hideProxySponsorChannel"))
hideProxySponsorChannel.setConfigBool(preferences.getBoolean("hideProxySponsorChannel", false));
if (preferences.contains("showAddToSavedMessages"))