Skip to content

Commit

Permalink
Fix MediaSourceInfoProvider.rememberMediaSourceInfo
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 committed Sep 21, 2024
1 parent 6319b81 commit e1124ab
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/*
* Copyright (C) 2024 OpenAni and contributors.
*
* 此源代码的使用受 GNU AFFERO GENERAL PUBLIC LICENSE version 3 许可证的约束, 可以在以下链接找到该许可证.
* Use of this source code is governed by the GNU AGPLv3 license, which can be found at the following link.
*
* https://github.com/open-ani/ani/blob/main/LICENSE
*/

package me.him188.ani.app.ui.subject.episode.mediaFetch

import androidx.compose.runtime.Composable
Expand All @@ -19,7 +28,7 @@ class MediaSourceInfoProvider(
) {
@Composable
fun rememberMediaSourceInfo(mediaSourceId: String): State<MediaSourceInfo?> {
return remember {
return remember(mediaSourceId) {
getSourceInfoFlow(mediaSourceId)
}.collectAsStateWithLifecycle(null)
}
Expand Down

0 comments on commit e1124ab

Please sign in to comment.