A cheap attempt at a native Bluesky client for Android

LikeRepostRowView: prep for click handler on avatars

+21 -7
+21 -7
app/src/main/java/industries/geesawra/monarch/LikeRepostRowView.kt
··· 1 1 package industries.geesawra.monarch 2 2 3 + import android.util.Log 3 4 import androidx.compose.animation.AnimatedContent 4 5 import androidx.compose.animation.SizeTransform 5 6 import androidx.compose.animation.animateContentSize ··· 22 23 import androidx.compose.foundation.layout.wrapContentHeight 23 24 import androidx.compose.foundation.shape.CircleShape 24 25 import androidx.compose.material.icons.Icons 26 + import androidx.compose.material.icons.filled.KeyboardArrowUp 25 27 import androidx.compose.material.icons.filled.Repeat 28 + import androidx.compose.material3.Icon 29 + import androidx.compose.material3.IconButton 26 30 import androidx.compose.material3.MaterialTheme 27 31 import androidx.compose.material3.Surface 28 32 import androidx.compose.material3.Text ··· 99 103 }, label = "size transform" 100 104 ) { 101 105 when (it) { 102 - true -> Column( 103 - modifier = Modifier 104 - .clickable { 105 - if (data.authors.count() > 1) { 106 - showAvatars.value = !showAvatars.value 107 - } 106 + true -> Column { 107 + IconButton( 108 + modifier = Modifier.align(Alignment.End), 109 + onClick = { 110 + showAvatars.value = !showAvatars.value 108 111 } 109 - ) { 112 + ) { 113 + Icon( 114 + imageVector = Icons.Default.KeyboardArrowUp, 115 + contentDescription = "Close avatar list", 116 + ) 117 + } 110 118 data.authors.take(8).forEachIndexed { idx, it -> 111 119 Row( 112 120 verticalAlignment = Alignment.CenterVertically, 113 121 horizontalArrangement = Arrangement.Start, 114 122 modifier = Modifier 115 123 .fillMaxWidth() 124 + .clickable { 125 + Log.d( 126 + "LikeRepostRowView", 127 + "Clicked ${it.author.handle.handle}" 128 + ) 129 + }, 116 130 ) { 117 131 AsyncImage( 118 132 model = ImageRequest.Builder(LocalContext.current)