From 1bb0773162f446d471beedc9e840c43915d9d97c Mon Sep 17 00:00:00 2001 From: Kirlill Makarov Date: Thu, 9 Feb 2017 10:45:41 +0300 Subject: [PATCH] fix bug, when notifications were wrong disabled or enabled #Apps-968 fixed --- app/build.gradle | 4 ++-- .../java/org/stepic/droid/preferences/UserPreferences.java | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 81fd7fb91b..0593e8d368 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -31,8 +31,8 @@ android { applicationId "org.stepic.droid" minSdkVersion minSdk targetSdkVersion 25 - versionCode 120 - versionName "1.27.1" + versionCode 121 + versionName "1.27.2" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" // Enabling multidex support. multiDexEnabled true diff --git a/app/src/main/java/org/stepic/droid/preferences/UserPreferences.java b/app/src/main/java/org/stepic/droid/preferences/UserPreferences.java index cae4d59dca..c34072c507 100644 --- a/app/src/main/java/org/stepic/droid/preferences/UserPreferences.java +++ b/app/src/main/java/org/stepic/droid/preferences/UserPreferences.java @@ -297,10 +297,9 @@ public void setKeepScreenOnSteps(boolean isChecked) { public boolean isNotificationEnabled(NotificationType type) { return !sharedPreferenceHelper.isNotificationDisabled(type); -// return false; // FIXME: 01.11.16 } - public void setNotificationEnabled(NotificationType type, boolean isChecked) { - sharedPreferenceHelper.setNotificationDisabled(type, isChecked); + public void setNotificationEnabled(NotificationType type, boolean isEnabled) { + sharedPreferenceHelper.setNotificationDisabled(type, !isEnabled); } }