mirror of
https://github.com/Myzel394/Alibi.git
synced 2025-06-18 23:05:26 +02:00
feat: Set NotificationSettings to null
if using default preset
This commit is contained in:
parent
6ad7ff12e6
commit
f68baaf1bf
@ -1,6 +1,5 @@
|
||||
package app.myzel394.alibi.ui.components.CustomRecordingNotificationsScreen.organisms
|
||||
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.clickable
|
||||
import androidx.compose.foundation.layout.Arrangement
|
||||
@ -19,7 +18,6 @@ import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.Checkbox
|
||||
import androidx.compose.material3.CheckboxDefaults
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Text
|
||||
|
@ -102,7 +102,12 @@ fun CustomRecordingNotificationsScreen(
|
||||
onNotificationChange = { notificationSettings ->
|
||||
scope.launch {
|
||||
dataStore.updateData { settings ->
|
||||
settings.setNotificationSettings(notificationSettings)
|
||||
settings.setNotificationSettings(notificationSettings.let {
|
||||
if (it.preset == NotificationSettings.Preset.Default)
|
||||
null
|
||||
else
|
||||
it
|
||||
})
|
||||
}
|
||||
}
|
||||
navController.popBackStack()
|
||||
|
Loading…
x
Reference in New Issue
Block a user