A cheap attempt at a native Bluesky client for Android
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

*: implement share button, improve padding

This commit introduces a share button to the `TimelinePostActionsView`. This button allows users to share a Bluesky post using the standard Android share sheet. The post's URI is passed as text to the share intent.

Additionally, this commit updates the padding for images displayed in `SkeetRowView`. The padding value has been increased from `4.dp` to `12.dp` for a more visually appealing layout.

geesawra f92a672f fb5aaadb

+33 -2
+8 -2
app/src/main/java/industries/geesawra/jerryno/SkeetRowView.kt
··· 89 89 replies = replies, 90 90 likes = likes, 91 91 reposts = reposts, 92 + uri = "https://bsky.app/profile/${skeet.post.author.handle.handle}/post/${ 93 + skeet.post.uri.split( 94 + "/" 95 + ).last() 96 + }" 92 97 ) 93 98 94 99 HorizontalDivider( ··· 139 144 val img = img[index] 140 145 141 146 val pv = { 147 + val v = 12.dp 142 148 when (index % 2 == 0) { 143 - true -> PaddingValues(4.dp) 144 - false -> PaddingValues(top = 4.dp, end = 4.dp, bottom = 4.dp) 149 + true -> PaddingValues(v) 150 + false -> PaddingValues(top = v, end = v, bottom = v) 145 151 } 146 152 }() 147 153
+25
app/src/main/java/industries/geesawra/jerryno/TimelinePostActionsView.kt
··· 1 1 package industries.geesawra.jerryno 2 2 3 + import android.content.Intent 3 4 import androidx.compose.foundation.layout.Arrangement 4 5 import androidx.compose.foundation.layout.Row 5 6 import androidx.compose.foundation.layout.padding ··· 8 9 import androidx.compose.material.icons.automirrored.filled.Reply 9 10 import androidx.compose.material.icons.automirrored.filled.ReplyAll 10 11 import androidx.compose.material.icons.filled.Repeat 12 + import androidx.compose.material.icons.filled.Share 11 13 import androidx.compose.material.icons.filled.ThumbUp 12 14 import androidx.compose.material3.Icon 13 15 import androidx.compose.material3.IconButton ··· 21 23 import androidx.compose.ui.Alignment 22 24 import androidx.compose.ui.Modifier 23 25 import androidx.compose.ui.graphics.vector.ImageVector 26 + import androidx.compose.ui.platform.LocalContext 24 27 import androidx.compose.ui.unit.dp 25 28 26 29 ··· 59 62 replies: Long?, 60 63 likes: Long?, 61 64 reposts: Long?, 65 + uri: String 62 66 ) { 63 67 64 68 Row( ··· 102 106 Icons.Default.Repeat, 103 107 contentDescription = "Repost", 104 108 number = reposts, 109 + ) 110 + } 111 + 112 + val ctx = LocalContext.current 113 + IconButton( 114 + onClick = { 115 + val sendIntent: Intent = Intent().apply { 116 + action = Intent.ACTION_SEND 117 + type = "text/plain" 118 + putExtra(Intent.EXTRA_TEXT, uri) 119 + } 120 + ctx.startActivity( 121 + Intent.createChooser(sendIntent, "Share Bluesky post") 122 + ) 123 + } 124 + ) { 125 + Icon( 126 + modifier = Modifier.size(15.dp), 127 + imageVector = Icons.Default.Share, 128 + contentDescription = "Share", 129 + tint = MaterialTheme.colorScheme.onSurfaceVariant 105 130 ) 106 131 } 107 132 }