From ed1eeac710b684bfef73367ea7526f375fcc169d Mon Sep 17 00:00:00 2001 From: Mario Danic Date: Fri, 15 Jun 2018 10:16:49 +0200 Subject: [PATCH] Fix rotation when selecting ringtone Signed-off-by: Mario Danic --- .../talk/adapters/items/NotificationSoundItem.java | 3 ++- .../nextcloud/talk/controllers/SettingsController.java | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/com/nextcloud/talk/adapters/items/NotificationSoundItem.java b/app/src/main/java/com/nextcloud/talk/adapters/items/NotificationSoundItem.java index ffa152287..d8119893a 100644 --- a/app/src/main/java/com/nextcloud/talk/adapters/items/NotificationSoundItem.java +++ b/app/src/main/java/com/nextcloud/talk/adapters/items/NotificationSoundItem.java @@ -98,7 +98,8 @@ public class NotificationSoundItem extends AbstractFlexibleItem { + settingsCallSound.setOnClickListener(v -> { Bundle bundle = new Bundle(); bundle.putBoolean(BundleKeys.KEY_ARE_CALL_SOUNDS, true); getRouter().pushController(RouterTransaction.with(new RingtoneSelectionController(bundle)) @@ -319,11 +319,13 @@ public class SettingsController extends BaseController { } catch (IOException e) { Log.e(TAG, "Failed to parse ringtone name"); } - settingsCallSounds.setSummary(ringtoneName); + settingsCallSound.setSummary(ringtoneName); } else { - settingsCallSounds.setSummary(R.string.nc_settings_default_ringtone); + settingsCallSound.setSummary(R.string.nc_settings_default_ringtone); } + ringtoneName = ""; + if (!TextUtils.isEmpty(appPreferences.getMessageRingtoneUri())) { try { ringtoneSettings = LoganSquare.parse(appPreferences.getMessageRingtoneUri(), RingtoneSettings.class);