mirror of
https://github.com/JustinZeus/Wholphin.git
synced 2026-07-08 23:51:21 +02:00
Fixes a few bugs (#535)
## Description A few minor bug fixes across the app - Fix the language not showing after search on the subtitle search & download dialog - Clear the backdrop whenever the home page is reloading from scratch - Enable pressing a remote's play (or play/pause) button on the series page to play the focused episode ### Related issues Play button follow up from #424
This commit is contained in:
parent
925a4b9d82
commit
60838c2a86
3 changed files with 10 additions and 1 deletions
|
|
@ -40,6 +40,7 @@ import androidx.compose.ui.focus.focusRequester
|
|||
import androidx.compose.ui.focus.focusRestorer
|
||||
import androidx.compose.ui.focus.onFocusChanged
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.input.key.onKeyEvent
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
|
@ -59,6 +60,7 @@ import com.github.damontecres.wholphin.ui.components.TabRow
|
|||
import com.github.damontecres.wholphin.ui.formatDateTime
|
||||
import com.github.damontecres.wholphin.ui.ifElse
|
||||
import com.github.damontecres.wholphin.ui.logTab
|
||||
import com.github.damontecres.wholphin.ui.playback.isPlayKeyUp
|
||||
import com.github.damontecres.wholphin.ui.tryRequestFocus
|
||||
import com.github.damontecres.wholphin.ui.util.rememberDelayedNestedScroll
|
||||
import kotlinx.coroutines.launch
|
||||
|
|
@ -249,6 +251,12 @@ fun SeriesOverviewContent(
|
|||
bringIntoViewRequester.bringIntoView()
|
||||
}
|
||||
}
|
||||
}.onKeyEvent {
|
||||
if (episode != null && isPlayKeyUp(it)) {
|
||||
onClick.invoke(episode)
|
||||
return@onKeyEvent true
|
||||
}
|
||||
return@onKeyEvent false
|
||||
},
|
||||
interactionSource = interactionSource,
|
||||
cardHeight = 120.dp,
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ class HomeViewModel
|
|||
),
|
||||
) {
|
||||
Timber.d("init HomeViewModel")
|
||||
backdropService.clearBackdrop()
|
||||
|
||||
serverRepository.currentUserDto.value?.let { userDto ->
|
||||
val includedIds =
|
||||
|
|
|
|||
|
|
@ -107,7 +107,7 @@ fun DownloadSubtitlesContent(
|
|||
color = MaterialTheme.colorScheme.onSurface,
|
||||
)
|
||||
// val lang = rememberTextFieldState(language)
|
||||
var lang by rememberSaveable { mutableStateOf("") }
|
||||
var lang by rememberSaveable { mutableStateOf(language) }
|
||||
Row(
|
||||
horizontalArrangement = Arrangement.spacedBy(8.dp),
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue