Skip to content

Commit

Permalink
fix: home page fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
muedsa committed Nov 7, 2023
1 parent 763271a commit b9224bc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions app/src/main/kotlin/com/muedsa/agetv/MainActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ class MainActivity : ComponentActivity() {
splashScreen.setKeepOnScreenCondition {
homePageViewModel.homeDataState.value.type == LazyType.LOADING
}
homePageViewModel.fetchHome()
setContent {

TvTheme {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ import com.muedsa.uitl.LogUtil
@Composable
@OptIn(UnstableApi::class)
fun PlaybackScreen(
mediaUrl: String
aid: Int,
episodeTitle: String,
mediaUrl: String,
danEpisodeId: Long = 0,
) {
val context = LocalContext.current
val errorMessageBoxState = remember { ErrorMessageBoxState() }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,4 @@ class HomePageViewModel @Inject constructor(
}
}
}

init {
viewModelScope.launch(context = Dispatchers.IO) {
fetchHome()
}
}
}

0 comments on commit b9224bc

Please sign in to comment.