From 22469e1d4986f6225d61c760092902db984a83aa Mon Sep 17 00:00:00 2001 From: acite <1498045907@qq.com> Date: Sat, 27 Sep 2025 16:06:02 +0800 Subject: [PATCH] [fix] Use before register --- .../com/acitelight/aether/viewModel/VideoPlayerViewModel.kt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/acitelight/aether/viewModel/VideoPlayerViewModel.kt b/app/src/main/java/com/acitelight/aether/viewModel/VideoPlayerViewModel.kt index 55bf651..aa3acbc 100644 --- a/app/src/main/java/com/acitelight/aether/viewModel/VideoPlayerViewModel.kt +++ b/app/src/main/java/com/acitelight/aether/viewModel/VideoPlayerViewModel.kt @@ -121,10 +121,11 @@ class VideoPlayerViewModel @Inject constructor( .build() viewModelScope.launch { + videos = mediaManager.queryVideoBulk(vs.first()[0], vs.map { it[1] })!! + val ii = database.userDao().getAll().first() val ix = ii.filter { it.id in videos.map{ m -> m.id } }.maxByOrNull { it.time } - videos = mediaManager.queryVideoBulk(vs.first()[0], vs.map { it[1] })!! startPlay( if(spec != "-1")