From c56b40f3f14b8b213ce6f26bb684c22c6a52e767 Mon Sep 17 00:00:00 2001 From: k1ngsterr1 Date: Sun, 1 Feb 2026 02:25:57 +0500 Subject: [PATCH] feat: enhance avatar merging effect with dynamic island representation in ProfileMetaballOverlay --- .../metaball/ProfileMetaballOverlay.kt | 30 ++++++++++++++++++- 1 file changed, 29 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/com/rosetta/messenger/ui/components/metaball/ProfileMetaballOverlay.kt b/app/src/main/java/com/rosetta/messenger/ui/components/metaball/ProfileMetaballOverlay.kt index 4008287..948103f 100644 --- a/app/src/main/java/com/rosetta/messenger/ui/components/metaball/ProfileMetaballOverlay.kt +++ b/app/src/main/java/com/rosetta/messenger/ui/components/metaball/ProfileMetaballOverlay.kt @@ -200,7 +200,35 @@ fun ProfileMetaballOverlay( modifier = modifier.fillMaxSize(), cutoff = ProfileMetaballConstants.CUTOFF ) { - // Avatar blob only - NO fake island + // Camera/Island blob - small circle at Dynamic Island position + // Only show when avatar is close enough to merge (create the droplet effect) + val showDroplet = collapseProgress > 0.3f && avatarState.showBlob + if (showDroplet) { + val islandSize = 40.dp // Small circle representing camera/island + val islandY = statusBarHeight / 2 - islandSize / 2 // Center of status bar + + MetaEntity( + modifier = Modifier.offset( + x = (screenWidth - islandSize) / 2, + y = islandY + ), + blur = ProfileMetaballConstants.BLUR_RADIUS, + metaContent = { + // Small black circle at camera position + Box( + modifier = Modifier + .size(islandSize) + .background( + color = Color.Black, + shape = RoundedCornerShape(islandSize / 2) // Perfect circle + ) + ) + }, + content = {} // No visible content, just the blur shape + ) + } + + // Avatar blob - moves up and shrinks on collapse if (avatarState.showBlob) { MetaEntity( modifier = Modifier.offset(x = avatarState.x, y = avatarState.y),