Skip to content

Commit

Permalink
fix: crash when remove latest banned live.
Browse files Browse the repository at this point in the history
fix: mistake about displaying streaming which have their subscription subscribed by local files.
  • Loading branch information
oxyroid committed Nov 3, 2023
1 parent 1e04eef commit 4820e1d
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,8 @@ class FeedRepositoryImpl @Inject constructor(
return@flow
}
val lives = when {
url.isNetworkUrl -> acquireNetwork(url)
url.isAndroidUrl -> acquireAndroid(url)
url.isNetworkUrl -> acquireNetwork(actualUrl)
url.isAndroidUrl -> acquireAndroid(actualUrl)
else -> emptyList()
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -173,13 +173,14 @@ private fun SettingScreen(
var fragment: SettingFragments by remember { mutableStateOf(SettingFragments.Root) }

DisposableEffect(fragment) {
helper.fob = Fob(
helper.fob = if (fragment == SettingFragments.Root) null
else Fob(
rootDestination = Destination.Root.Setting,
icon = Icons.Rounded.Settings
) {
fragment = SettingFragments.Root
}
.takeUnless { fragment == SettingFragments.Root }

onDispose {
helper.fob = null
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,12 +40,12 @@ import androidx.compose.ui.unit.sp
import com.m3u.core.util.readFileName
import com.m3u.data.database.entity.Live
import com.m3u.features.setting.components.MutedLiveItem
import com.m3u.i18n.R.string
import com.m3u.material.components.Button
import com.m3u.material.components.LabelField
import com.m3u.material.components.TextButton
import com.m3u.material.model.LocalSpacing
import com.m3u.material.model.LocalTheme
import com.m3u.i18n.R.string

@Composable
internal fun SubscriptionsFragment(
Expand All @@ -65,15 +65,15 @@ internal fun SubscriptionsFragment(
val spacing = LocalSpacing.current
val theme = LocalTheme.current
val focusRequester = remember { FocusRequester() }
val mutedLives = mutedLivesFactory()
LazyColumn(
verticalArrangement = Arrangement.spacedBy(spacing.small),
modifier = modifier
.padding(spacing.medium)
.focusGroup()
) {
val mutedLives = mutedLivesFactory()
if (mutedLives.isNotEmpty()) {
item {
item {
if (mutedLives.isNotEmpty()) {
Column(
modifier = Modifier
.fillMaxWidth()
Expand Down

0 comments on commit 4820e1d

Please sign in to comment.