diff --git a/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java b/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java index bbbc41af..a68a8aed 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java +++ b/app/src/main/java/gr/thmmy/mthmmy/base/BaseActivity.java @@ -152,7 +152,7 @@ public abstract class BaseActivity extends AppCompatActivity { private AccountHeader accountHeader; private ProfileDrawerItem profileDrawerItem; - private PrimaryDrawerItem downloadsItem, settingsItem, loginLogoutItem; + private PrimaryDrawerItem downloadsItem, loginLogoutItem; private IconicsDrawable loginIcon, logoutIcon; /** @@ -163,7 +163,7 @@ public abstract class BaseActivity extends AppCompatActivity { final int selectedPrimaryColor = ContextCompat.getColor(this, R.color.primary_dark); final int selectedSecondaryColor = ContextCompat.getColor(this, R.color.accent); - PrimaryDrawerItem homeItem, bookmarksItem, aboutItem; + PrimaryDrawerItem homeItem, bookmarksItem, settingsItem, aboutItem; IconicsDrawable homeIcon, homeIconSelected, downloadsIcon, downloadsIconSelected, settingsIcon, settingsIconSelected, bookmarksIcon, bookmarksIconSelected, aboutIcon, aboutIconSelected; @@ -396,7 +396,7 @@ public abstract class BaseActivity extends AppCompatActivity { setDefaultAvatar(); } else { if (!drawer.getDrawerItems().contains(downloadsItem)){ - drawer.addItemAtPosition(settingsItem, 2); + drawer.addItemAtPosition(downloadsItem, 2); } loginLogoutItem.withName(R.string.logout).withIcon(logoutIcon); //Swap login with logout profileDrawerItem.withName(sessionManager.getUsername()); diff --git a/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java b/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java index f6db39ad..ed837d78 100644 --- a/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java +++ b/app/src/main/java/gr/thmmy/mthmmy/services/NotificationService.java @@ -76,7 +76,8 @@ public class NotificationService extends FirebaseMessagingService { Timber.i("Creating a notification..."); SharedPreferences settingsFile = getSharedPreferences(SETTINGS_SHARED_PREFS, Context.MODE_PRIVATE); - Uri notificationSoundUri = Uri.parse(settingsFile.getString(SELECTED_RINGTONE, null)); + String notificationsSound = settingsFile.getString(SELECTED_RINGTONE, null); + Uri notificationSoundUri = notificationsSound != null ? Uri.parse(notificationsSound) : null; SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(this); boolean notificationsVibrateEnabled = sharedPrefs.getBoolean(NOTIFICATION_VIBRATION_KEY, true);