mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 11:39:42 +01:00
Fix rotation when selecting ringtone
Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
parent
c0d242f286
commit
ed1eeac710
@ -98,7 +98,8 @@ public class NotificationSoundItem extends AbstractFlexibleItem<NotificationSoun
|
||||
|
||||
holder.magicFlipView.flipSilently(adapter.isSelected(position) || isSelected());
|
||||
|
||||
if (isSelected()) {
|
||||
if (isSelected() && !adapter.isSelected(position)) {
|
||||
adapter.toggleSelection(position);
|
||||
selected = false;
|
||||
}
|
||||
|
||||
|
@ -123,7 +123,7 @@ public class SettingsController extends BaseController {
|
||||
TextView baseUrlTextView;
|
||||
|
||||
@BindView(R.id.settings_call_sound)
|
||||
MaterialStandardPreference settingsCallSounds;
|
||||
MaterialStandardPreference settingsCallSound;
|
||||
|
||||
@BindView(R.id.settings_message_sound)
|
||||
MaterialStandardPreference settingsMessageSound;
|
||||
@ -229,7 +229,7 @@ public class SettingsController extends BaseController {
|
||||
|
||||
versionInfo.setSummary("v" + BuildConfig.VERSION_NAME);
|
||||
|
||||
settingsCallSounds.setOnClickListener(v -> {
|
||||
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);
|
||||
|
Loading…
Reference in New Issue
Block a user