Skip to content

Commit

Permalink
add back handler when edit mode is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
aarash709 committed Dec 11, 2023
1 parent 062e548 commit deabc49
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package com.recorder.feature.playlist

import android.content.res.Configuration.UI_MODE_NIGHT_NO
import android.content.res.Configuration.UI_MODE_NIGHT_YES
import androidx.activity.compose.BackHandler
import androidx.compose.animation.AnimatedContent
import androidx.compose.animation.AnimatedVisibility
import androidx.compose.animation.fadeIn
Expand Down Expand Up @@ -183,7 +184,11 @@ fun PlaylistContent(
selectedVoices += voices.map { it.title }
}
}

BackHandler(isInEditMode) {
if (isInEditMode){
selectedVoices = emptySet()
}
}
Scaffold(
modifier = Modifier,
contentWindowInsets = WindowInsets(0, 0, 0, 0),
Expand Down

0 comments on commit deabc49

Please sign in to comment.