Remove top app bar scroll behavior

This lets us make it more consistent with the Compose screens for now. Maybe it'll return in the future.

This also includes making the AboutController a full Compose controller with a new abstracted TopAppBar composable.
This commit is contained in:
arkon
2022-07-16 17:58:43 -04:00
parent 2096df301d
commit 80c7a45328
9 changed files with 168 additions and 155 deletions

View File

@@ -11,10 +11,7 @@ import androidx.compose.material.icons.Icons
import androidx.compose.material.icons.filled.ArrowBack
import androidx.compose.material.icons.filled.ArrowForward
import androidx.compose.material.icons.filled.Close
import androidx.compose.material3.Icon
import androidx.compose.material3.IconButton
import androidx.compose.material3.LinearProgressIndicator
import androidx.compose.material3.SmallTopAppBar
import androidx.compose.runtime.Composable
import androidx.compose.runtime.remember
import androidx.compose.ui.Modifier
@@ -28,7 +25,7 @@ import com.google.accompanist.web.rememberWebViewNavigator
import com.google.accompanist.web.rememberWebViewState
import eu.kanade.presentation.components.AppBar
import eu.kanade.presentation.components.AppBarActions
import eu.kanade.presentation.components.AppBarTitle
import eu.kanade.presentation.components.TopAppBar
import eu.kanade.tachiyomi.BuildConfig
import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.util.system.setDefaultSettings
@@ -48,21 +45,11 @@ fun WebViewScreen(
val navigator = rememberWebViewNavigator()
Column {
SmallTopAppBar(
title = {
AppBarTitle(
title = state.pageTitle ?: initialTitle,
subtitle = state.content.getCurrentUrl(),
)
},
navigationIcon = {
IconButton(onClick = onUp) {
Icon(
imageVector = Icons.Default.Close,
contentDescription = stringResource(R.string.action_close),
)
}
},
TopAppBar(
title = state.pageTitle ?: initialTitle,
subtitle = state.content.getCurrentUrl(),
navigateUp = onUp,
navigationIcon = Icons.Default.Close,
actions = {
AppBarActions(
listOf(