A cheap attempt at a native Bluesky client for Android

SkeetView: Use heart icon for likes

Replace the thumbs-up icon with a heart icon for liking posts. This provides a more conventional and universally understood symbol for likes.

The new filled and outlined heart vector icons have been added and centralized in `VectorImages.kt` for reuse.

+107 -58
+7 -55
app/src/main/java/industries/geesawra/monarch/LikeRepostRowView.kt
··· 23 23 import androidx.compose.ui.draw.clip 24 24 import androidx.compose.ui.graphics.Color 25 25 import androidx.compose.ui.graphics.ColorFilter 26 - import androidx.compose.ui.graphics.SolidColor 27 - import androidx.compose.ui.graphics.vector.ImageVector 28 - import androidx.compose.ui.graphics.vector.path 29 26 import androidx.compose.ui.platform.LocalContext 30 27 import androidx.compose.ui.text.font.FontWeight 31 28 import androidx.compose.ui.text.style.TextAlign ··· 66 63 .build(), 67 64 contentDescription = "Avatar", 68 65 modifier = Modifier 69 - .size(minSize) 66 + .size( 67 + when (data.kind) { 68 + RepeatableNotification.Like -> minSize + 8.dp 69 + RepeatableNotification.Repost -> minSize 70 + } 71 + ) 70 72 .offset( 71 73 x = when (idx) { 72 74 0 -> 0.dp ··· 109 111 } icon", 110 112 modifier = Modifier 111 113 .size(minSize) 112 - .clip(CircleShape) 113 114 ) 114 115 115 116 val authors = data.authors ··· 167 168 } 168 169 } 169 170 } 170 - } 171 - 172 - private val HeartFilled: ImageVector 173 - get() { 174 - if (_HeartFilled != null) return _HeartFilled!! 175 - 176 - _HeartFilled = ImageVector.Builder( 177 - name = "HeartFilled", 178 - defaultWidth = 16.dp, 179 - defaultHeight = 16.dp, 180 - viewportWidth = 16f, 181 - viewportHeight = 16f 182 - ).apply { 183 - path( 184 - fill = SolidColor(Color.Black) 185 - ) { 186 - moveTo(14.88f, 4.78079f) 187 - curveTo(14.7993f, 4.46498f, 14.6748f, 4.16202f, 14.51f, 3.88077f) 188 - curveTo(14.3518f, 3.58819f, 14.1493f, 3.3217f, 13.91f, 3.09073f) 189 - curveTo(13.563f, 2.74486f, 13.152f, 2.46982f, 12.7f, 2.28079f) 190 - curveTo(11.7902f, 1.90738f, 10.7698f, 1.90738f, 9.85999f, 2.28079f) 191 - curveTo(9.43276f, 2.46163f, 9.04027f, 2.71541f, 8.70002f, 3.03079f) 192 - lineTo(8.65003f, 3.09073f) 193 - lineTo(8.00001f, 3.74075f) 194 - lineTo(7.34999f, 3.09073f) 195 - lineTo(7.3f, 3.03079f) 196 - curveTo(6.95975f, 2.71541f, 6.56726f, 2.46163f, 6.14002f, 2.28079f) 197 - curveTo(5.23018f, 1.90738f, 4.20984f, 1.90738f, 3.3f, 2.28079f) 198 - curveTo(2.84798f, 2.46982f, 2.43706f, 2.74486f, 2.09004f, 3.09073f) 199 - curveTo(1.85051f, 3.32402f, 1.64514f, 3.59002f, 1.48002f, 3.88077f) 200 - curveTo(1.32258f, 4.1644f, 1.20161f, 4.46682f, 1.12f, 4.78079f) 201 - curveTo(1.03522f, 5.10721f, 0.994861f, 5.44358f, 1.00001f, 5.78079f) 202 - curveTo(1.00053f, 6.09791f, 1.04084f, 6.41365f, 1.12f, 6.72073f) 203 - curveTo(1.20384f, 7.03078f, 1.32472f, 7.32961f, 1.48002f, 7.61075f) 204 - curveTo(1.64774f, 7.89975f, 1.85285f, 8.16542f, 2.09004f, 8.40079f) 205 - lineTo(8.00001f, 14.3108f) 206 - lineTo(13.91f, 8.40079f) 207 - curveTo(14.1471f, 8.16782f, 14.3492f, 7.90169f, 14.51f, 7.61075f) 208 - curveTo(14.6729f, 7.33211f, 14.7974f, 7.03272f, 14.88f, 6.72073f) 209 - curveTo(14.9592f, 6.41365f, 14.9995f, 6.09791f, 15f, 5.78079f) 210 - curveTo(15.0052f, 5.44358f, 14.9648f, 5.10721f, 14.88f, 4.78079f) 211 - close() 212 - } 213 - }.build() 214 - 215 - return _HeartFilled!! 216 - } 217 - 218 - private var _HeartFilled: ImageVector? = null 219 - 171 + }
+1 -3
app/src/main/java/industries/geesawra/monarch/TimelinePostActionsView.kt
··· 15 15 import androidx.compose.material.icons.filled.Repeat 16 16 import androidx.compose.material.icons.filled.RepeatOn 17 17 import androidx.compose.material.icons.filled.Share 18 - import androidx.compose.material.icons.filled.ThumbUp 19 - import androidx.compose.material.icons.filled.ThumbUpOffAlt 20 18 import androidx.compose.material3.Icon 21 19 import androidx.compose.material3.IconButton 22 20 import androidx.compose.material3.MaterialTheme ··· 186 184 } 187 185 ) { 188 186 IconWithNumber( 189 - if (isLiked) Icons.Default.ThumbUp else Icons.Default.ThumbUpOffAlt, 187 + if (isLiked) HeartFilled else Heart, 190 188 contentDescription = "Like", 191 189 number = likes, 192 190 tint = if (isLiked) MaterialTheme.colorScheme.primary else MaterialTheme.colorScheme.onSurfaceVariant
+99
app/src/main/java/industries/geesawra/monarch/VectorImages.kt
··· 1 + package industries.geesawra.monarch 2 + 3 + import androidx.compose.ui.graphics.Color 4 + import androidx.compose.ui.graphics.PathFillType 5 + import androidx.compose.ui.graphics.SolidColor 6 + import androidx.compose.ui.graphics.vector.ImageVector 7 + import androidx.compose.ui.graphics.vector.path 8 + import androidx.compose.ui.unit.dp 9 + 10 + val HeartFilled: ImageVector 11 + get() { 12 + if (_HeartFilled != null) return _HeartFilled!! 13 + 14 + _HeartFilled = ImageVector.Builder( 15 + name = "HeartFilled", 16 + defaultWidth = 15.dp, 17 + defaultHeight = 15.dp, 18 + viewportWidth = 15f, 19 + viewportHeight = 15f 20 + ).apply { 21 + path( 22 + fill = SolidColor(Color.Black), 23 + pathFillType = PathFillType.EvenOdd 24 + ) { 25 + moveTo(1.35248f, 4.90532f) 26 + curveTo(1.35248f, 2.94498f, 2.936f, 1.35248f, 4.89346f, 1.35248f) 27 + curveTo(6.25769f, 1.35248f, 6.86058f, 1.92336f, 7.50002f, 2.93545f) 28 + curveTo(8.13946f, 1.92336f, 8.74235f, 1.35248f, 10.1066f, 1.35248f) 29 + curveTo(12.064f, 1.35248f, 13.6476f, 2.94498f, 13.6476f, 4.90532f) 30 + curveTo(13.6476f, 6.74041f, 12.6013f, 8.50508f, 11.4008f, 9.96927f) 31 + curveTo(10.2636f, 11.3562f, 8.92194f, 12.5508f, 8.00601f, 13.3664f) 32 + curveTo(7.94645f, 13.4194f, 7.88869f, 13.4709f, 7.83291f, 13.5206f) 33 + curveTo(7.64324f, 13.6899f, 7.3568f, 13.6899f, 7.16713f, 13.5206f) 34 + curveTo(7.11135f, 13.4709f, 7.05359f, 13.4194f, 6.99403f, 13.3664f) 35 + curveTo(6.0781f, 12.5508f, 4.73641f, 11.3562f, 3.59926f, 9.96927f) 36 + curveTo(2.39872f, 8.50508f, 1.35248f, 6.74041f, 1.35248f, 4.90532f) 37 + close() 38 + } 39 + }.build() 40 + 41 + return _HeartFilled!! 42 + } 43 + 44 + private var _HeartFilled: ImageVector? = null 45 + 46 + val Heart: ImageVector 47 + get() { 48 + if (_Heart != null) return _Heart!! 49 + 50 + _Heart = ImageVector.Builder( 51 + name = "Heart", 52 + defaultWidth = 15.dp, 53 + defaultHeight = 15.dp, 54 + viewportWidth = 15f, 55 + viewportHeight = 15f 56 + ).apply { 57 + path( 58 + fill = SolidColor(Color.Black), 59 + pathFillType = PathFillType.EvenOdd 60 + ) { 61 + moveTo(4.89346f, 2.35248f) 62 + curveTo(3.49195f, 2.35248f, 2.35248f, 3.49359f, 2.35248f, 4.90532f) 63 + curveTo(2.35248f, 6.38164f, 3.20954f, 7.9168f, 4.37255f, 9.33522f) 64 + curveTo(5.39396f, 10.581f, 6.59464f, 11.6702f, 7.50002f, 12.4778f) 65 + curveTo(8.4054f, 11.6702f, 9.60608f, 10.581f, 10.6275f, 9.33522f) 66 + curveTo(11.7905f, 7.9168f, 12.6476f, 6.38164f, 12.6476f, 4.90532f) 67 + curveTo(12.6476f, 3.49359f, 11.5081f, 2.35248f, 10.1066f, 2.35248f) 68 + curveTo(9.27059f, 2.35248f, 8.81894f, 2.64323f, 8.5397f, 2.95843f) 69 + curveTo(8.27877f, 3.25295f, 8.14623f, 3.58566f, 8.02501f, 3.88993f) 70 + curveTo(8.00391f, 3.9429f, 7.98315f, 3.99501f, 7.96211f, 4.04591f) 71 + curveTo(7.88482f, 4.23294f, 7.7024f, 4.35494f, 7.50002f, 4.35494f) 72 + curveTo(7.29765f, 4.35494f, 7.11523f, 4.23295f, 7.03793f, 4.04592f) 73 + curveTo(7.01689f, 3.99501f, 6.99612f, 3.94289f, 6.97502f, 3.8899f) 74 + curveTo(6.8538f, 3.58564f, 6.72126f, 3.25294f, 6.46034f, 2.95843f) 75 + curveTo(6.18109f, 2.64323f, 5.72945f, 2.35248f, 4.89346f, 2.35248f) 76 + close() 77 + moveTo(1.35248f, 4.90532f) 78 + curveTo(1.35248f, 2.94498f, 2.936f, 1.35248f, 4.89346f, 1.35248f) 79 + curveTo(6.0084f, 1.35248f, 6.73504f, 1.76049f, 7.20884f, 2.2953f) 80 + curveTo(7.32062f, 2.42147f, 7.41686f, 2.55382f, 7.50002f, 2.68545f) 81 + curveTo(7.58318f, 2.55382f, 7.67941f, 2.42147f, 7.79119f, 2.2953f) 82 + curveTo(8.265f, 1.76049f, 8.99164f, 1.35248f, 10.1066f, 1.35248f) 83 + curveTo(12.064f, 1.35248f, 13.6476f, 2.94498f, 13.6476f, 4.90532f) 84 + curveTo(13.6476f, 6.74041f, 12.6013f, 8.50508f, 11.4008f, 9.96927f) 85 + curveTo(10.2636f, 11.3562f, 8.92194f, 12.5508f, 8.00601f, 13.3664f) 86 + curveTo(7.94645f, 13.4194f, 7.88869f, 13.4709f, 7.83291f, 13.5206f) 87 + curveTo(7.64324f, 13.6899f, 7.3568f, 13.6899f, 7.16713f, 13.5206f) 88 + curveTo(7.11135f, 13.4709f, 7.05359f, 13.4194f, 6.99403f, 13.3664f) 89 + curveTo(6.0781f, 12.5508f, 4.73641f, 11.3562f, 3.59926f, 9.96927f) 90 + curveTo(2.39872f, 8.50508f, 1.35248f, 6.74041f, 1.35248f, 4.90532f) 91 + close() 92 + } 93 + }.build() 94 + 95 + return _Heart!! 96 + } 97 + 98 + private var _Heart: ImageVector? = null 99 +