mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-19 19:49:33 +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());
|
holder.magicFlipView.flipSilently(adapter.isSelected(position) || isSelected());
|
||||||
|
|
||||||
if (isSelected()) {
|
if (isSelected() && !adapter.isSelected(position)) {
|
||||||
|
adapter.toggleSelection(position);
|
||||||
selected = false;
|
selected = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ public class SettingsController extends BaseController {
|
|||||||
TextView baseUrlTextView;
|
TextView baseUrlTextView;
|
||||||
|
|
||||||
@BindView(R.id.settings_call_sound)
|
@BindView(R.id.settings_call_sound)
|
||||||
MaterialStandardPreference settingsCallSounds;
|
MaterialStandardPreference settingsCallSound;
|
||||||
|
|
||||||
@BindView(R.id.settings_message_sound)
|
@BindView(R.id.settings_message_sound)
|
||||||
MaterialStandardPreference settingsMessageSound;
|
MaterialStandardPreference settingsMessageSound;
|
||||||
@ -229,7 +229,7 @@ public class SettingsController extends BaseController {
|
|||||||
|
|
||||||
versionInfo.setSummary("v" + BuildConfig.VERSION_NAME);
|
versionInfo.setSummary("v" + BuildConfig.VERSION_NAME);
|
||||||
|
|
||||||
settingsCallSounds.setOnClickListener(v -> {
|
settingsCallSound.setOnClickListener(v -> {
|
||||||
Bundle bundle = new Bundle();
|
Bundle bundle = new Bundle();
|
||||||
bundle.putBoolean(BundleKeys.KEY_ARE_CALL_SOUNDS, true);
|
bundle.putBoolean(BundleKeys.KEY_ARE_CALL_SOUNDS, true);
|
||||||
getRouter().pushController(RouterTransaction.with(new RingtoneSelectionController(bundle))
|
getRouter().pushController(RouterTransaction.with(new RingtoneSelectionController(bundle))
|
||||||
@ -319,11 +319,13 @@ public class SettingsController extends BaseController {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.e(TAG, "Failed to parse ringtone name");
|
Log.e(TAG, "Failed to parse ringtone name");
|
||||||
}
|
}
|
||||||
settingsCallSounds.setSummary(ringtoneName);
|
settingsCallSound.setSummary(ringtoneName);
|
||||||
} else {
|
} else {
|
||||||
settingsCallSounds.setSummary(R.string.nc_settings_default_ringtone);
|
settingsCallSound.setSummary(R.string.nc_settings_default_ringtone);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ringtoneName = "";
|
||||||
|
|
||||||
if (!TextUtils.isEmpty(appPreferences.getMessageRingtoneUri())) {
|
if (!TextUtils.isEmpty(appPreferences.getMessageRingtoneUri())) {
|
||||||
try {
|
try {
|
||||||
ringtoneSettings = LoganSquare.parse(appPreferences.getMessageRingtoneUri(), RingtoneSettings.class);
|
ringtoneSettings = LoganSquare.parse(appPreferences.getMessageRingtoneUri(), RingtoneSettings.class);
|
||||||
|
Loading…
Reference in New Issue
Block a user