๐Ÿ”— Redirect Bluesky links to your preferred client
3
fork

Configure Feed

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

feat: enhance UI and add tangled workflow

Turtlepaw 19f98bb4 a072247d

+87 -52
+15
.github/workflows/tangled.yaml
··· 1 + name: Tangle 2 + 3 + on: 4 + push: 5 + branches: [ main ] 6 + workflow_dispatch: 7 + 8 + jobs: 9 + tangle: 10 + runs-on: ubuntu-latest 11 + steps: 12 + - uses: gwennlbh/to-tangled@v0.3 13 + with: 14 + repo: did:plc:u2grpouz5553mrn4x772pyfa/bluesky_redirect 15 + ssh-key: ${{ secrets.TANGLED_KEY }}
+1 -1
shared/src/main/java/dev/zwander/shared/LinkSheet.kt
··· 33 33 val targetColor = BottomSheetDefaults.ScrimColor 34 34 35 35 LaunchedEffect(Unit) { 36 - delay(500) // wait 1 second 36 + delay(200) // wait 1 second 37 37 anim.animateTo(targetColor, animationSpec = tween(1000)) // fade over 1 second 38 38 } 39 39
+3 -1
shared/src/main/java/dev/zwander/shared/components/AnimatedCard.kt
··· 8 8 import androidx.compose.foundation.interaction.MutableInteractionSource 9 9 import androidx.compose.foundation.layout.Column 10 10 import androidx.compose.foundation.layout.ColumnScope 11 + import androidx.compose.foundation.layout.padding 11 12 import androidx.compose.material3.CardColors 12 13 import androidx.compose.material3.CardDefaults 13 14 import androidx.compose.material3.CardElevation ··· 18 19 import androidx.compose.runtime.remember 19 20 import androidx.compose.ui.Modifier 20 21 import androidx.compose.ui.graphics.Shape 22 + import androidx.compose.ui.unit.dp 21 23 22 24 @Composable 23 25 fun AnimatedCard( ··· 57 59 border = border, 58 60 interactionSource = interactionSource, 59 61 ) { 60 - Column(content = content) 62 + Column(content = content, modifier = Modifier.padding(8.dp)) 61 63 } 62 64 }
+18 -14
shared/src/main/java/dev/zwander/shared/components/AppChooserLayout.kt
··· 41 41 import androidx.compose.runtime.setValue 42 42 import androidx.compose.ui.Alignment 43 43 import androidx.compose.ui.Modifier 44 + import androidx.compose.ui.draw.clip 44 45 import androidx.compose.ui.graphics.asImageBitmap 45 46 import androidx.compose.ui.graphics.painter.BitmapPainter 46 47 import androidx.compose.ui.platform.LocalContext ··· 160 161 val isInstalled = launchStrategy.rememberIsInstalled() 161 162 val context = LocalContext.current 162 163 164 + val clip = if (total <= 1) RoundedCornerShape(large) else RoundedCornerShape( 165 + topStart = if (index == 0) large else small, 166 + topEnd = if (index == 0) large else small, 167 + bottomStart = if (index == total - 1) large else small, 168 + bottomEnd = if (index == total - 1) large else small 169 + ) 163 170 Card( 164 - modifier = modifier.clickable( 165 - onClick = { 166 - if (isInstalled) { 167 - onStrategySelected(launchStrategy) 168 - } else if (launchStrategy.sourceUrl != null) { 169 - context.launchUrl(launchStrategy.sourceUrl!!) 171 + modifier = modifier 172 + .clip(clip) 173 + .clickable( 174 + onClick = { 175 + if (isInstalled) { 176 + onStrategySelected(launchStrategy) 177 + } else if (launchStrategy.sourceUrl != null) { 178 + context.launchUrl(launchStrategy.sourceUrl!!) 179 + } 170 180 } 171 - } 172 - ), 173 - shape = if (total <= 1) RoundedCornerShape(large) else RoundedCornerShape( 174 - topStart = if (index == 0) large else small, 175 - topEnd = if (index == 0) large else small, 176 - bottomStart = if (index == total - 1) large else small, 177 - bottomEnd = if (index == total - 1) large else small 178 - ) 181 + ), 182 + shape = clip 179 183 ) { 180 184 Box( 181 185 modifier = Modifier.padding(horizontal = 14.dp, vertical = 8.dp),
+25 -31
shared/src/main/java/dev/zwander/shared/components/FooterLayout.kt
··· 80 80 R.string.github, 81 81 R.drawable.github, 82 82 ) { 83 - context.openLinkNaturally("https://github.com/zacharee/MastodonRedirect/".toUri()) 83 + context.openLinkNaturally("https://github.com/Turtlepaw/BlueskyRedirect".toUri()) 84 84 }, 85 85 FooterButton( 86 86 R.string.patreon, 87 - R.drawable.patreon, 87 + R.drawable.tangled, 88 88 ) { 89 - context.openLinkNaturally("https://www.patreon.com/zacharywander".toUri()) 89 + context.openLinkNaturally("https://tangled.org/did:plc:u2grpouz5553mrn4x772pyfa/bluesky_redirect".toUri()) 90 90 }, 91 91 FooterButton( 92 92 R.string.bluesky, 93 93 R.drawable.bluesky, 94 94 ) { 95 95 context.openLinkNaturally("https://bsky.app/profile/turtlepaw.on.computer".toUri()) 96 - }, 97 - FooterButton( 98 - R.string.supporters, 99 - R.drawable.heart, 100 - ) { 101 - showingSupportersDialog = true 102 96 }, 103 97 FooterButton( 104 98 R.string.options, ··· 202 196 modifier = Modifier.fillMaxWidth(), 203 197 verticalArrangement = Arrangement.spacedBy(8.dp), 204 198 ) { 205 - item { 206 - TextSwitch( 207 - text = stringResource(id = R.string.enable_crash_reports), 208 - subtitle = stringResource(id = R.string.enable_crash_reports_desc), 209 - checked = enableCrashReports, 210 - onCheckedChange = { enableCrashReports = it }, 211 - modifier = Modifier.fillMaxWidth(), 212 - ) 213 - } 214 - 215 - item { 216 - TextSwitch( 217 - text = stringResource(id = R.string.open_media_in_browser), 218 - subtitle = stringResource( 219 - id = R.string.open_media_in_browser_desc, 220 - appModel.appName 221 - ), 222 - checked = openMediaInBrowser, 223 - onCheckedChange = { openMediaInBrowser = it }, 224 - modifier = Modifier.fillMaxWidth(), 225 - ) 226 - } 199 + // item { 200 + // TextSwitch( 201 + // text = stringResource(id = R.string.enable_crash_reports), 202 + // subtitle = stringResource(id = R.string.enable_crash_reports_desc), 203 + // checked = enableCrashReports, 204 + // onCheckedChange = { enableCrashReports = it }, 205 + // modifier = Modifier.fillMaxWidth(), 206 + // ) 207 + // } 208 + // 209 + // item { 210 + // TextSwitch( 211 + // text = stringResource(id = R.string.open_media_in_browser), 212 + // subtitle = stringResource( 213 + // id = R.string.open_media_in_browser_desc, 214 + // appModel.appName 215 + // ), 216 + // checked = openMediaInBrowser, 217 + // onCheckedChange = { openMediaInBrowser = it }, 218 + // modifier = Modifier.fillMaxWidth(), 219 + // ) 220 + // } 227 221 228 222 item { 229 223 AnimatedCard(
+2 -2
shared/src/main/java/dev/zwander/shared/components/TextSwitch.kt
··· 5 5 import androidx.compose.foundation.layout.fillMaxWidth 6 6 import androidx.compose.foundation.layout.padding 7 7 import androidx.compose.material3.CardDefaults 8 + import androidx.compose.material3.Checkbox 8 9 import androidx.compose.material3.MaterialTheme 9 - import androidx.compose.material3.Switch 10 10 import androidx.compose.material3.Text 11 11 import androidx.compose.runtime.Composable 12 12 import androidx.compose.ui.Alignment ··· 50 50 } 51 51 } 52 52 53 - Switch( 53 + Checkbox( 54 54 checked = checked, 55 55 onCheckedChange = onCheckedChange, 56 56 enabled = enabled,
+9 -1
shared/src/main/res/drawable/github.xml
··· 1 - <!-- drawable/github.xml --><vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="24dp" android:width="24dp" android:viewportWidth="24" android:viewportHeight="24"><path android:fillColor="#000000" android:pathData="M12,2A10,10 0 0,0 2,12C2,16.42 4.87,20.17 8.84,21.5C9.34,21.58 9.5,21.27 9.5,21C9.5,20.77 9.5,20.14 9.5,19.31C6.73,19.91 6.14,17.97 6.14,17.97C5.68,16.81 5.03,16.5 5.03,16.5C4.12,15.88 5.1,15.9 5.1,15.9C6.1,15.97 6.63,16.93 6.63,16.93C7.5,18.45 8.97,18 9.54,17.76C9.63,17.11 9.89,16.67 10.17,16.42C7.95,16.17 5.62,15.31 5.62,11.5C5.62,10.39 6,9.5 6.65,8.79C6.55,8.54 6.2,7.5 6.75,6.15C6.75,6.15 7.59,5.88 9.5,7.17C10.29,6.95 11.15,6.84 12,6.84C12.85,6.84 13.71,6.95 14.5,7.17C16.41,5.88 17.25,6.15 17.25,6.15C17.8,7.5 17.45,8.54 17.35,8.79C18,9.5 18.38,10.39 18.38,11.5C18.38,15.32 16.04,16.16 13.81,16.41C14.17,16.72 14.5,17.33 14.5,18.26C14.5,19.6 14.5,20.68 14.5,21C14.5,21.27 14.66,21.59 15.17,21.5C19.14,20.16 22,16.42 22,12A10,10 0 0,0 12,2Z" /></vector> 1 + <vector xmlns:android="http://schemas.android.com/apk/res/android" 2 + android:width="24dp" 3 + android:height="24dp" 4 + android:viewportWidth="24" 5 + android:viewportHeight="24"> 6 + <path 7 + android:fillColor="#FF000000" 8 + android:pathData="M12,0.297c-6.63,0 -12,5.373 -12,12 0,5.303 3.438,9.8 8.205,11.385 0.6,0.113 0.82,-0.258 0.82,-0.577 0,-0.285 -0.01,-1.04 -0.015,-2.04 -3.338,0.724 -4.042,-1.61 -4.042,-1.61C4.422,18.07 3.633,17.7 3.633,17.7c-1.087,-0.744 0.084,-0.729 0.084,-0.729 1.205,0.084 1.838,1.236 1.838,1.236 1.07,1.835 2.809,1.305 3.495,0.998 0.108,-0.776 0.417,-1.305 0.76,-1.605 -2.665,-0.3 -5.466,-1.332 -5.466,-5.93 0,-1.31 0.465,-2.38 1.235,-3.22 -0.135,-0.303 -0.54,-1.523 0.105,-3.176 0,0 1.005,-0.322 3.3,1.23 0.96,-0.267 1.98,-0.399 3,-0.405 1.02,0.006 2.04,0.138 3,0.405 2.28,-1.552 3.285,-1.23 3.285,-1.23 0.645,1.653 0.24,2.873 0.12,3.176 0.765,0.84 1.23,1.91 1.23,3.22 0,4.61 -2.805,5.625 -5.475,5.92 0.42,0.36 0.81,1.096 0.81,2.22 0,1.606 -0.015,2.896 -0.015,3.286 0,0.315 0.21,0.69 0.825,0.57C20.565,22.092 24,17.592 24,12.297c0,-6.627 -5.373,-12 -12,-12" /> 9 + </vector>
+1 -1
shared/src/main/res/drawable/ic_launcher_foreground.xml
··· 9 9 android:translateX="264" 10 10 android:translateY="264"> 11 11 <path 12 - android:fillColor="#000000" 12 + android:fillColor="#89dceb" 13 13 android:pathData="M240,296v64q0,17 -11.5,28.5T200,400q-17,0 -28.5,-11.5T160,360v-160q0,-17 11.5,-28.5T200,160h160q17,0 28.5,11.5T400,200q0,17 -11.5,28.5T360,240h-64l201,201q11,11 17,25.5t6,30.5v263q0,17 -11.5,28.5T480,800q-17,0 -28.5,-11.5T440,760v-264L240,296ZM720,296 L622,395q-12,12 -28.5,12T565,395q-12,-12 -12,-29t12,-29l99,-97h-64q-17,0 -28.5,-11.5T560,200q0,-17 11.5,-28.5T600,160h160q17,0 28.5,11.5T800,200v160q0,17 -11.5,28.5T760,400q-17,0 -28.5,-11.5T720,360v-64Z" /> 14 14 </group> 15 15 </vector>
+12
shared/src/main/res/drawable/tangled.xml
··· 1 + <vector xmlns:android="http://schemas.android.com/apk/res/android" 2 + android:width="24dp" 3 + android:height="24dp" 4 + android:viewportWidth="67" 5 + android:viewportHeight="67"> 6 + 7 + <path 8 + android:fillColor="#FF000000" 9 + android:fillType="nonZero" 10 + android:pathData="M43.597,64.264L43.424,64.165L42.885,64.136L42.347,64.109L41.611,64.04L40.877,63.971L40.877,63.829L39.784,63.613L38.891,63.187L38.883,62.965L37.464,62.197L35.989,61.115L34.592,59.771L33.413,58.251L32.507,56.733L32.435,56.656L31.677,57.517L30.488,58.661L29.496,59.44L28.149,60.309L27.485,60.619L26.821,60.925L26.848,61.099L25.933,61.344L24.131,61.883L23.656,62.003L23.181,62.123L22.139,62.192L21.093,62.261L19.197,62.075L18.997,61.912L18.587,62.019L18.453,61.885L18.317,61.749L17.76,61.627L17.205,61.504L15.619,60.952L13.883,60.083L12.139,58.867L10.515,57.328L9.317,55.784L8.64,54.645L8.072,53.507L7.403,51.707L6.957,49.619L6.96,45.917L7.304,44.216L7.883,42.408L8.723,40.704L9.099,40.099L8.571,39.739L7.621,39.197L6.197,38.155L4.8,36.811L3.795,35.557L2.944,34.243L2.253,32.824L1.611,31.021L1.171,28.936L1.181,25.235L1.712,22.963L2.419,21.141L2.864,20.323L3.309,19.507L4.475,17.931L5.819,16.531L7.053,15.544L8.285,14.739L9.997,13.909L10.941,13.563L11.891,11.763L13.024,10.149L14.699,8.413L16.067,7.371L17.691,6.416L19.376,5.717L20.493,5.36L22.613,4.939L25.744,4.955L28.115,5.448L29.728,6.037L31.488,6.915L32.765,5.68L33.619,5.008L34.472,4.464L35.232,4.024L36.464,3.443L37.888,2.917L38.741,2.72L39.595,2.525L41.493,2.301L43.771,2.429L45.667,2.808L47.184,3.301L48.707,4L49.976,4.773L51.36,5.816L52.909,7.397L53.72,8.435L54.443,9.581L55.267,11.288L55.768,12.717L56.139,14.485L56.197,14.531L58.571,15.688L60.221,16.84L61.872,18.405L62.872,19.656L63.76,21.029L64.576,22.768L64.816,23.48L65.053,24.192L65.496,26.28L65.493,29.789L65.155,31.472L64.672,33.016L64.016,34.515L63.235,35.861L62.219,37.24L60.859,38.672L59.331,39.861L57.621,40.864L57.389,41.051L57.691,41.744L58.157,42.883L59.168,46.773L59.515,48.384L59.507,51.989L59.293,52.987L59.08,53.981L58.6,55.405L57.584,57.493L56.395,59.2L54.773,60.883L53.256,62.059L52.083,62.765L50.789,63.333L50.315,63.587L48.987,63.973L47.269,64.28L45.76,64.264L45.381,64.248L44.432,64.229L43.768,64.365L43.597,64.264ZM31.677,50L32.251,49.952L33.352,49.589L34.003,49.277L34.656,48.963L36.12,47.859L37.341,46.488L38.512,44.968L39.517,43.451L40.661,41.459L41.376,39.795L41.528,39.701L42.579,41.099L43.453,41.904L44.528,42.397L46.141,42.472L47.28,42.045L48.349,40.955L48.597,40.211L48.843,39.467L48.997,38.659L49.152,37.853L49.101,36.715L49.053,35.576L48.645,33.304L48.187,31.592L47.435,29.445L46.547,27.797L45.92,26.944L45.256,26.304L45.357,25.331L45.029,24.003L44.672,23.243L44.317,22.483L43.341,21.408L42.416,20.728L41.328,21.384L39.904,21.701L38.805,21.587L37.552,21.115L36.92,20.635L36.712,20.635L36.416,21.256L35.568,22.224L34.661,22.8L34.072,22.997L33.483,23.195L31.987,23.195L30.947,22.837L30.341,22.525L29.061,21.344L28.552,20.893L27.384,21.949L26.504,22.368L25.555,22.624L24.384,22.627L23.187,22.253L22.645,22.768L22,23.643L21.096,23.979L20.48,24.437L19.896,25.045L18.003,27.864L16.851,30.264L15.667,32.731L14.891,34.533L14.595,35.707L14.552,36.259L14.509,36.811L14.691,38.107L15.205,39.155L15.971,39.821L16.971,40.288L18.437,40.299L19.056,40.037L19.672,39.779L20.24,39.373L22.203,37.805L22.347,37.893L22.472,40.384L22.944,43.12L23.419,45.064L24.12,46.677L24.68,47.531L25.269,48.165L26.787,49.261L27.557,49.651L28.704,49.947L30.013,50.112L31.104,50.045L31.677,50ZM33.507,40.672L33.205,40.509L32.64,39.795L32.405,38.816L32.533,35.861L32.723,33.584L33.107,31.592L33.395,30.464L33.755,29.76L34.461,29.179L35.461,28.955L36.371,29.299L36.979,29.96L37.2,30.947L36.608,33.4L36.517,34.109L36.427,34.819L36.213,39.181L36.013,39.989L35.421,40.581L34.811,40.843L33.808,40.835L33.507,40.672ZM26.016,39.717L25.627,39.533L25.157,38.896L24.952,38.328L24.891,37.968L24.832,37.608L24.661,35.101L24.856,32.731L25.115,31.581L25.52,30.499L26.021,29.904L26.787,29.555L27.547,29.555L28.304,29.907L28.8,30.453L29.016,31.099L29.016,31.912L28.837,32.381L28.536,33.851L28.536,36.147L28.651,37.192L28.765,38.24L28.275,39.309L27.483,39.835L26.408,39.899L26.016,39.717Z" /> 11 + 12 + </vector>
+1 -1
shared/src/main/res/values/ic_launcher_background.xml
··· 1 1 <?xml version="1.0" encoding="utf-8"?> 2 2 <resources> 3 - <color name="ic_launcher_background">#50B2FF</color> 3 + <color name="ic_launcher_background">#181825</color> 4 4 </resources>