Recently Written · git

subread-android

SubRead for Android: times an audiobook against its ebook on the device

git clone https://github.com/equwal/subread-android

Log | Files | Refs


commit cb5d68ebdf7570ec19a53d07a173ed320fca918b
equwal <truex@equwal.com>
2026-09-21 03:14:37 -0700

Use the KTX toUri for the two links

 app/src/main/kotlin/space/subread/app/MainActivity.kt | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/app/src/main/kotlin/space/subread/app/MainActivity.kt b/app/src/main/kotlin/space/subread/app/MainActivity.kt
index 8362273..09d1632 100644
--- a/app/src/main/kotlin/space/subread/app/MainActivity.kt
+++ b/app/src/main/kotlin/space/subread/app/MainActivity.kt
@@ -42,6 +42,7 @@ import androidx.compose.ui.text.font.FontWeight
 import androidx.compose.ui.unit.dp
 import androidx.core.content.FileProvider
 import androidx.core.content.edit
+import androidx.core.net.toUri
 import androidx.lifecycle.compose.collectAsStateWithLifecycle
 import space.subread.app.job.Job
 import space.subread.app.job.JobStatus
@@ -347,7 +348,7 @@ private fun Outputs(
                 style = MaterialTheme.typography.bodySmall)
             // Opens the browser. The app itself still has no network permission.
             OutlinedButton(onClick = {
-                runCatching { context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://honjimaku.com/"))) }
+                runCatching { context.startActivity(Intent(Intent.ACTION_VIEW, "https://honjimaku.com/".toUri())) }
             }) { Text("Open honjimaku.com") }
         }
 
@@ -379,7 +380,7 @@ private fun Outputs(
             val context = LocalContext.current
             // Opens the browser. The app itself still has no network permission.
             OutlinedButton(onClick = {
-                runCatching { context.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("https://ko-fi.com/truex"))) }
+                runCatching { context.startActivity(Intent(Intent.ACTION_VIEW, "https://ko-fi.com/truex".toUri())) }
             }) { Text("Support on Ko-fi") }
         }
     }