[1.161.*] Pre-release merge (#605)
This commit is contained in:
+2
-1
@@ -11,7 +11,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
- Change submitter text to 'authored' when applicable
|
||||
- Unread comments now have a brighter background rather than a text badge
|
||||
- Opening posts you have previously seen will show the number of new comments since last visit
|
||||
- Opening posts you have previously seen will show the number of new comments since last visit
|
||||
- Bottom navigation's visibility now interacts with the scroll behavior of the post lists
|
||||
|
||||
## [1.48.0] - 2024-06-05
|
||||
|
||||
|
||||
+6
-2
@@ -13,8 +13,10 @@ import androidx.compose.animation.core.LinearOutSlowInEasing
|
||||
import androidx.compose.animation.core.tween
|
||||
import androidx.compose.animation.slideInVertically
|
||||
import androidx.compose.animation.slideOutVertically
|
||||
import androidx.compose.material3.BottomAppBar
|
||||
import androidx.compose.material3.BottomAppBarScrollBehavior
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.NavigationBar
|
||||
import androidx.compose.material3.NavigationBarItem
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
@@ -29,11 +31,13 @@ import kotlinx.collections.immutable.ImmutableList
|
||||
|
||||
const val AnimationDuration = 100
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun ClawNavigationBar(
|
||||
navController: NavController,
|
||||
items: ImmutableList<NavigationItem>,
|
||||
isVisible: Boolean,
|
||||
scrollBehavior: BottomAppBarScrollBehavior,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
AnimatedVisibility(
|
||||
@@ -52,7 +56,7 @@ fun ClawNavigationBar(
|
||||
),
|
||||
modifier = Modifier,
|
||||
) {
|
||||
NavigationBar(modifier = modifier) {
|
||||
BottomAppBar(modifier = modifier, scrollBehavior = scrollBehavior) {
|
||||
val navBackStackEntry = navController.currentBackStackEntryAsState().value
|
||||
val currentDestination = navBackStackEntry?.destination
|
||||
items.forEach { navItem ->
|
||||
|
||||
+9
-1
@@ -26,6 +26,7 @@ import androidx.compose.material.icons.filled.Whatshot
|
||||
import androidx.compose.material.icons.outlined.FavoriteBorder
|
||||
import androidx.compose.material.icons.outlined.NewReleases
|
||||
import androidx.compose.material.icons.outlined.Whatshot
|
||||
import androidx.compose.material3.BottomAppBarDefaults
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
@@ -44,6 +45,7 @@ import androidx.compose.runtime.rememberCoroutineScope
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.shadow
|
||||
import androidx.compose.ui.input.nestedscroll.nestedScroll
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import androidx.compose.ui.res.stringResource
|
||||
@@ -110,6 +112,8 @@ fun LobstersPostsScreen(
|
||||
val snackbarHostState = remember { SnackbarHostState() }
|
||||
val postActions = rememberPostActions(context, urlLauncher, navController, viewModel)
|
||||
|
||||
val scrollBehavior = BottomAppBarDefaults.exitAlwaysScrollBehavior()
|
||||
|
||||
val hottestPosts = viewModel.hottestPosts.collectAsLazyPagingItems()
|
||||
val newestPosts = viewModel.newestPosts.collectAsLazyPagingItems()
|
||||
val savedPosts by viewModel.savedPostsByMonth.collectAsState(persistentMapOf())
|
||||
@@ -205,11 +209,15 @@ fun LobstersPostsScreen(
|
||||
navController = navController,
|
||||
items = navItems,
|
||||
isVisible = currentDestination.any(navDestinations),
|
||||
scrollBehavior = scrollBehavior,
|
||||
)
|
||||
}
|
||||
},
|
||||
snackbarHost = { SnackbarHost(snackbarHostState) },
|
||||
modifier = modifier.semantics { testTagsAsResourceId = true },
|
||||
modifier =
|
||||
modifier.nestedScroll(scrollBehavior.nestedScrollConnection).semantics {
|
||||
testTagsAsResourceId = true
|
||||
},
|
||||
) { paddingValues ->
|
||||
Row(modifier = Modifier.padding(paddingValues)) {
|
||||
AnimatedVisibility(visible = navigationType == ClawNavigationType.NAVIGATION_RAIL) {
|
||||
|
||||
@@ -76,7 +76,7 @@ dagger = { module = "com.google.dagger:dagger", version.ref = "dagger" }
|
||||
dagger-compiler = { module = "com.google.dagger:dagger-compiler", version.ref = "dagger" }
|
||||
eithernet = "com.slack.eithernet:eithernet:1.9.0"
|
||||
javax-inject = "javax.inject:javax.inject:1"
|
||||
jsoup = "org.jsoup:jsoup:1.17.2"
|
||||
jsoup = "org.jsoup:jsoup:1.18.1"
|
||||
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junit" }
|
||||
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junit" }
|
||||
junit-legacy = "junit:junit:4.13.2"
|
||||
|
||||
Reference in New Issue
Block a user