mirror of
https://github.com/Novaloop-AG/element-x-android.git
synced 2026-11-04 01:19:33 +00:00
Rename parameter onSoundPicked to onSoundPick.
This commit is contained in:
+4
-4
@@ -286,7 +286,7 @@ private fun SoundsPreferenceCategory(state: NotificationSettingsState) {
|
|||||||
type = RingtoneManager.TYPE_NOTIFICATION,
|
type = RingtoneManager.TYPE_NOTIFICATION,
|
||||||
current = state.messageSound.sound,
|
current = state.messageSound.sound,
|
||||||
defaultUri = Settings.System.DEFAULT_NOTIFICATION_URI,
|
defaultUri = Settings.System.DEFAULT_NOTIFICATION_URI,
|
||||||
onSoundPicked = { sound -> state.eventSink(NotificationSettingsEvents.SetMessageSound(sound)) },
|
onSoundPick = { sound -> state.eventSink(NotificationSettingsEvents.SetMessageSound(sound)) },
|
||||||
)
|
)
|
||||||
// Skip the initial 0 emission so the picker doesn't auto-open on screen entry; only
|
// Skip the initial 0 emission so the picker doesn't auto-open on screen entry; only
|
||||||
// increments fired by LaunchMessageSoundPicker should launch it.
|
// increments fired by LaunchMessageSoundPicker should launch it.
|
||||||
@@ -313,7 +313,7 @@ private fun SoundsPreferenceCategory(state: NotificationSettingsState) {
|
|||||||
type = RingtoneManager.TYPE_RINGTONE,
|
type = RingtoneManager.TYPE_RINGTONE,
|
||||||
current = state.callRingtone.sound,
|
current = state.callRingtone.sound,
|
||||||
defaultUri = Settings.System.DEFAULT_RINGTONE_URI,
|
defaultUri = Settings.System.DEFAULT_RINGTONE_URI,
|
||||||
onSoundPicked = { sound -> state.eventSink(NotificationSettingsEvents.SetCallRingtone(sound)) },
|
onSoundPick = { sound -> state.eventSink(NotificationSettingsEvents.SetCallRingtone(sound)) },
|
||||||
)
|
)
|
||||||
// Skip the initial 0 emission so the picker doesn't auto-open on screen entry; only
|
// Skip the initial 0 emission so the picker doesn't auto-open on screen entry; only
|
||||||
// increments fired by LaunchCallRingtonePicker should launch it.
|
// increments fired by LaunchCallRingtonePicker should launch it.
|
||||||
@@ -441,7 +441,7 @@ private fun rememberSoundPickerOnClick(
|
|||||||
type: Int,
|
type: Int,
|
||||||
current: NotificationSound,
|
current: NotificationSound,
|
||||||
defaultUri: Uri,
|
defaultUri: Uri,
|
||||||
onSoundPicked: (NotificationSound) -> Unit,
|
onSoundPick: (NotificationSound) -> Unit,
|
||||||
): () -> Unit {
|
): () -> Unit {
|
||||||
// Paparazzi previews don't provide a LocalActivityResultRegistryOwner, which
|
// Paparazzi previews don't provide a LocalActivityResultRegistryOwner, which
|
||||||
// rememberLauncherForActivityResult requires. Skip the launcher in inspection mode and
|
// rememberLauncherForActivityResult requires. Skip the launcher in inspection mode and
|
||||||
@@ -453,7 +453,7 @@ private fun rememberSoundPickerOnClick(
|
|||||||
if (result.resultCode == Activity.RESULT_OK) {
|
if (result.resultCode == Activity.RESULT_OK) {
|
||||||
val sound = result.data?.toPickedNotificationSound(defaultUri)
|
val sound = result.data?.toPickedNotificationSound(defaultUri)
|
||||||
if (sound != null) {
|
if (sound != null) {
|
||||||
onSoundPicked(sound)
|
onSoundPick(sound)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user