@@ -49,7 +49,7 @@ import androidx.compose.runtime.setValue
4949import androidx.compose.ui.Alignment
5050import androidx.compose.ui.Modifier
5151import androidx.compose.ui.draw.clip
52- import androidx.compose.ui.draw.rotate
52+ import androidx.compose.ui.graphics.graphicsLayer
5353import androidx.compose.ui.layout.ContentScale
5454import androidx.compose.ui.text.LinkAnnotation
5555import androidx.compose.ui.text.buildAnnotatedString
@@ -61,6 +61,7 @@ import com.tunjid.heron.images.AsyncImage
6161import com.tunjid.heron.images.ImageArgs
6262import com.tunjid.heron.ui.PaneTransitionScope
6363import com.tunjid.heron.ui.UiTokens
64+ import com.tunjid.heron.ui.modifiers.shapedClickable
6465import com.tunjid.heron.ui.shapes.RoundedPolygonShape
6566import org.jetbrains.compose.resources.StringResource
6667import org.jetbrains.compose.resources.stringResource
@@ -130,7 +131,10 @@ fun NotificationAggregateScaffold(
130131 with (paneTransitionScope) {
131132 Box (
132133 modifier = Modifier
133- .animateBounds(lookaheadScope = this , boundsTransform = childBoundsTransform)
134+ .animateBounds(
135+ lookaheadScope = this ,
136+ boundsTransform = childBoundsTransform,
137+ )
134138 .clip(ExpandableAvatarRowShape ),
135139 ) {
136140 if (isExpanded) Column (
@@ -171,14 +175,17 @@ private fun PaneTransitionScope.ExpandButton(
171175 isExpanded : Boolean ,
172176 onExpansionToggled : (Boolean ) -> Unit ,
173177) {
178+ val rotationState = animateFloatAsState(if (isExpanded) 180f else 0f )
174179 IconButton (
175180 modifier = Modifier
176181 .animateBounds(
177182 lookaheadScope = this @ExpandButton,
178183 boundsTransform = childBoundsTransform,
179184 )
180185 .size(32 .dp)
181- .rotate(animateFloatAsState(if (isExpanded) 180f else 0f ).value),
186+ .graphicsLayer {
187+ rotationZ = rotationState.value
188+ },
182189 onClick = {
183190 onExpansionToggled(! isExpanded)
184191 },
@@ -208,16 +215,18 @@ private fun PaneTransitionScope.ExpandableProfiles(
208215 ) {
209216 PaneStickySharedElement (
210217 modifier = Modifier
211- .size(ExpandableAvatarSize ),
218+ .size(ExpandableAvatarSize )
219+ .clip(CircleShape )
220+ .shapedClickable(CircleShape ) {
221+ onProfileClicked(notification, profile)
222+ },
212223 sharedContentState = rememberSharedContentState(
213224 key = notification.avatarSharedElementKey(profile),
214225 ),
215226 ) {
216227 AsyncImage (
217228 modifier = Modifier
218- .fillParentAxisIfFixedOrWrap()
219- .clip(CircleShape )
220- .clickable { onProfileClicked(notification, profile) },
229+ .fillParentAxisIfFixedOrWrap(),
221230 args = ImageArgs (
222231 url = profile.avatar?.uri,
223232 contentScale = ContentScale .Crop ,
0 commit comments