mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 15:50:16 +02:00
UI tweaks
This commit is contained in:
parent
bdfe143308
commit
8bbcd50385
4 changed files with 8 additions and 14 deletions
|
|
@ -63,17 +63,8 @@ abstract class LoadingItemViewModel<T : DolphinModel>(
|
||||||
open fun init(
|
open fun init(
|
||||||
itemId: UUID,
|
itemId: UUID,
|
||||||
potential: BaseItem?,
|
potential: BaseItem?,
|
||||||
): Job? {
|
): Job? =
|
||||||
if (item.value == null && potential?.id == itemId) {
|
viewModelScope.launch(
|
||||||
item.value = potential
|
|
||||||
loading.value = LoadingState.Success
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
if (item.value?.id == itemId) {
|
|
||||||
loading.value = LoadingState.Success
|
|
||||||
return null
|
|
||||||
}
|
|
||||||
return viewModelScope.launch(
|
|
||||||
LoadingExceptionHandler(
|
LoadingExceptionHandler(
|
||||||
loading,
|
loading,
|
||||||
"Error loading item $itemId",
|
"Error loading item $itemId",
|
||||||
|
|
@ -93,5 +84,4 @@ abstract class LoadingItemViewModel<T : DolphinModel>(
|
||||||
loading.value = LoadingState.Error("Error loading item $itemId", e)
|
loading.value = LoadingState.Error("Error loading item $itemId", e)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -207,7 +207,7 @@ fun MovieDetailsHeader(
|
||||||
}
|
}
|
||||||
dto.genres?.letNotEmpty {
|
dto.genres?.letNotEmpty {
|
||||||
TitleValueText(
|
TitleValueText(
|
||||||
stringResource(R.string.studios),
|
stringResource(R.string.genres),
|
||||||
it.joinToString(", "),
|
it.joinToString(", "),
|
||||||
modifier = Modifier.widthIn(max = 80.dp),
|
modifier = Modifier.widthIn(max = 80.dp),
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@ import androidx.media3.ui.compose.state.rememberPresentationState
|
||||||
import androidx.media3.ui.compose.state.rememberPreviousButtonState
|
import androidx.media3.ui.compose.state.rememberPreviousButtonState
|
||||||
import androidx.tv.material3.MaterialTheme
|
import androidx.tv.material3.MaterialTheme
|
||||||
import com.github.damontecres.dolphin.preferences.UserPreferences
|
import com.github.damontecres.dolphin.preferences.UserPreferences
|
||||||
|
import com.github.damontecres.dolphin.ui.components.LoadingPage
|
||||||
import com.github.damontecres.dolphin.ui.nav.Destination
|
import com.github.damontecres.dolphin.ui.nav.Destination
|
||||||
import com.github.damontecres.dolphin.ui.nav.NavigationManager
|
import com.github.damontecres.dolphin.ui.nav.NavigationManager
|
||||||
import com.github.damontecres.dolphin.ui.tryRequestFocus
|
import com.github.damontecres.dolphin.ui.tryRequestFocus
|
||||||
|
|
@ -147,7 +148,9 @@ fun PlaybackContent(
|
||||||
Modifier
|
Modifier
|
||||||
.matchParentSize()
|
.matchParentSize()
|
||||||
.background(Color.Black),
|
.background(Color.Black),
|
||||||
)
|
) {
|
||||||
|
LoadingPage()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!controllerViewState.controlsVisible && skipIndicatorDuration != 0L) {
|
if (!controllerViewState.controlsVisible && skipIndicatorDuration != 0L) {
|
||||||
|
|
|
||||||
|
|
@ -41,4 +41,5 @@
|
||||||
<string name="studios">Studios</string>
|
<string name="studios">Studios</string>
|
||||||
<string name="video">Video</string>
|
<string name="video">Video</string>
|
||||||
<string name="audio">Audio</string>
|
<string name="audio">Audio</string>
|
||||||
|
<string name="genres">Genres</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue