Revert "Bring back tag expand / collapse shared element transition"

This reverts commit cd803974de86f4bf94b1d39e4d95687b80a721d9.

Close #1145
This commit is contained in:
MM20 2024-11-23 22:28:50 +01:00
parent cc26217594
commit 25551859c5
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389

View File

@ -55,9 +55,8 @@ fun FavoritesTagSelector(
) { ) {
val sheetManager = LocalBottomSheetManager.current val sheetManager = LocalBottomSheetManager.current
SharedTransitionScope {
AnimatedContent( AnimatedContent(
modifier = it modifier = Modifier
.fillMaxWidth() .fillMaxWidth()
.padding( .padding(
top = if (reverse) 8.dp else 4.dp, top = if (reverse) 8.dp else 4.dp,
@ -80,11 +79,7 @@ fun FavoritesTagSelector(
) { ) {
FilterChip( FilterChip(
modifier = Modifier modifier = Modifier
.padding(start = 16.dp) .padding(start = 16.dp),
.sharedBounds(
rememberSharedContentState("favorites"),
this@AnimatedContent
),
selected = selectedTag == null, selected = selectedTag == null,
onClick = { onSelectTag(null) }, onClick = { onSelectTag(null) },
leadingIcon = if (compact) null else { leadingIcon = if (compact) null else {
@ -111,11 +106,7 @@ fun FavoritesTagSelector(
for (tag in tags) { for (tag in tags) {
TagChip( TagChip(
modifier = Modifier modifier = Modifier
.padding(start = 8.dp) .padding(start = 8.dp),
.sharedBounds(
rememberSharedContentState("tag-${tag.tag}"),
this@AnimatedContent
),
tag = tag, tag = tag,
selected = selectedTag == tag.tag, selected = selectedTag == tag.tag,
onClick = { onClick = {
@ -137,11 +128,7 @@ fun FavoritesTagSelector(
} }
IconButton( IconButton(
modifier = Modifier modifier = Modifier
.rotate(rot) .rotate(rot),
.sharedBounds(
rememberSharedContentState("expand"),
this@AnimatedContent
),
onClick = { onExpand(true) }) { onClick = { onExpand(true) }) {
Icon(Icons.Rounded.ExpandMore, null) Icon(Icons.Rounded.ExpandMore, null)
} }
@ -151,11 +138,6 @@ fun FavoritesTagSelector(
if (editButton) { if (editButton) {
SmallFloatingActionButton( SmallFloatingActionButton(
modifier = Modifier
.sharedBounds(
rememberSharedContentState("edit"),
this@AnimatedContent
),
elevation = FloatingActionButtonDefaults.bottomAppBarFabElevation(), elevation = FloatingActionButtonDefaults.bottomAppBarFabElevation(),
onClick = { sheetManager.showEditFavoritesSheet() } onClick = { sheetManager.showEditFavoritesSheet() }
) { ) {
@ -177,11 +159,7 @@ fun FavoritesTagSelector(
) { ) {
FilterChip( FilterChip(
modifier = Modifier modifier = Modifier
.padding(end = 8.dp) .padding(end = 8.dp),
.sharedBounds(
rememberSharedContentState("favorites"),
this@AnimatedContent
),
selected = selectedTag == null, selected = selectedTag == null,
onClick = { onSelectTag(null) }, onClick = { onSelectTag(null) },
leadingIcon = if (compact) null else { leadingIcon = if (compact) null else {
@ -208,11 +186,7 @@ fun FavoritesTagSelector(
for (tag in tags) { for (tag in tags) {
TagChip( TagChip(
modifier = Modifier modifier = Modifier
.padding(end = 8.dp) .padding(end = 8.dp),
.sharedBounds(
rememberSharedContentState("tag-${tag.tag}"),
this@AnimatedContent
),
tag = tag, tag = tag,
compact = compact, compact = compact,
selected = selectedTag == tag.tag, selected = selectedTag == tag.tag,
@ -239,11 +213,7 @@ fun FavoritesTagSelector(
} }
IconButton( IconButton(
modifier = Modifier modifier = Modifier
.rotate(rot) .rotate(rot),
.sharedBounds(
rememberSharedContentState("expand"),
this@AnimatedContent
),
onClick = { onExpand(false) } onClick = { onExpand(false) }
) { ) {
Icon(Icons.Rounded.ExpandLess, null) Icon(Icons.Rounded.ExpandLess, null)
@ -251,11 +221,6 @@ fun FavoritesTagSelector(
if (editButton) { if (editButton) {
SmallFloatingActionButton( SmallFloatingActionButton(
modifier = Modifier
.sharedBounds(
rememberSharedContentState("edit"),
this@AnimatedContent
),
elevation = FloatingActionButtonDefaults.bottomAppBarFabElevation(), elevation = FloatingActionButtonDefaults.bottomAppBarFabElevation(),
onClick = { sheetManager.showEditFavoritesSheet() } onClick = { sheetManager.showEditFavoritesSheet() }
) { ) {
@ -269,6 +234,5 @@ fun FavoritesTagSelector(
} }
} }
} }
}
} }