[fix] Video Remember id mass
This commit is contained in:
@@ -61,6 +61,7 @@ dependencies {
|
||||
implementation(libs.bcprov.jdk15on)
|
||||
implementation(libs.converter.gson)
|
||||
implementation(libs.gson)
|
||||
|
||||
implementation(libs.androidx.media3.exoplayer)
|
||||
implementation(libs.androidx.media3.ui)
|
||||
implementation(libs.androidx.media3.common)
|
||||
|
||||
@@ -22,6 +22,6 @@ interface VideoRecordDao {
|
||||
@Delete
|
||||
suspend fun delete(rec: VideoRecord)
|
||||
|
||||
@Query("SELECT * FROM videorecord WHERE id = :id")
|
||||
suspend fun getById(id: String): VideoRecord?
|
||||
@Query("SELECT * FROM videorecord WHERE id = :id and name = :klass")
|
||||
suspend fun get(id: String, klass: String): VideoRecord?
|
||||
}
|
||||
@@ -130,8 +130,8 @@ fun generateColorScheme(primaryColor: Color, isDarkMode: Boolean): ColorScheme {
|
||||
}
|
||||
}
|
||||
|
||||
private val DarkColorScheme = generateColorScheme(Color(0xFF4A6F9F), isDarkMode = true)
|
||||
private val LightColorScheme = generateColorScheme(Color(0xFF4A6F9F), isDarkMode = false)
|
||||
private val DarkColorScheme = generateColorScheme(Color(0xFF36A0FF), isDarkMode = true)
|
||||
private val LightColorScheme = generateColorScheme(Color(0xFF36A0FF), isDarkMode = false)
|
||||
|
||||
@Composable
|
||||
fun AetherTheme(
|
||||
|
||||
@@ -252,7 +252,7 @@ fun VideoScreen(
|
||||
Card(
|
||||
Modifier
|
||||
.fillMaxHeight()
|
||||
.width(200.dp)
|
||||
.width(250.dp)
|
||||
.align(Alignment.CenterEnd),
|
||||
shape = RoundedCornerShape(8.dp),
|
||||
colors = CardDefaults.cardColors(containerColor = colorScheme.surface)
|
||||
@@ -294,13 +294,13 @@ fun CatalogueItemRow(
|
||||
.padding(4.dp)
|
||||
.padding(horizontal = 4.dp)
|
||||
.heightIn(min = 28.dp)
|
||||
.width(200.dp),
|
||||
.width(250.dp),
|
||||
shape = RoundedCornerShape(8.dp),
|
||||
colors = CardDefaults.cardColors(containerColor = colorScheme.primary)
|
||||
) {
|
||||
Text(
|
||||
text = item.second,
|
||||
fontSize = 18.sp,
|
||||
fontSize = 14.sp,
|
||||
maxLines = 1,
|
||||
textAlign = TextAlign.Center,
|
||||
modifier = Modifier
|
||||
@@ -408,7 +408,7 @@ fun VideoCard(
|
||||
text = video.video.name,
|
||||
fontSize = 12.sp,
|
||||
fontWeight = FontWeight.Bold,
|
||||
maxLines = 2,
|
||||
maxLines = 4,
|
||||
modifier = Modifier
|
||||
.padding(8.dp)
|
||||
.background(Color.Transparent)
|
||||
|
||||
@@ -158,7 +158,7 @@ class VideoPlayerViewModel @Inject constructor(
|
||||
if(!renderedFirst)
|
||||
{
|
||||
viewModelScope.launch {
|
||||
val ii = database.userDao().getById(video!!.id)
|
||||
val ii = database.userDao().get(video!!.id, video!!.klass)
|
||||
if(ii != null)
|
||||
{
|
||||
_player!!.seekTo(ii.position)
|
||||
|
||||
@@ -22,6 +22,7 @@ activityCompose = "1.11.0"
|
||||
composeBom = "2025.09.00"
|
||||
media3Common = "1.8.0"
|
||||
media3Exoplayer = "1.8.0"
|
||||
media3ExoplayerFfmpeg = "1.8.0"
|
||||
media3Ui = "1.8.0"
|
||||
navigationCompose = "2.9.4"
|
||||
okhttp = "5.1.0"
|
||||
|
||||
Reference in New Issue
Block a user