File tree Expand file tree Collapse file tree
android/app/src/main/java/me/kavishdevar/librepods/presentation/screens Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ package me.kavishdevar.librepods.presentation.screens
2020
2121import android.content.Intent
2222import android.content.pm.PackageManager
23+ import android.net.Uri
2324import android.os.Build
2425import android.widget.Toast
2526import androidx.compose.foundation.background
@@ -542,10 +543,23 @@ fun AppSettingsScreen(
542543 name = stringResource(R .string.github_issues),
543544 navController = navController,
544545 onClick = {
545- val intent = Intent (
546- Intent .ACTION_VIEW ,
547- " https://github.com/kavishdevar/librepods/issues" .toUri()
546+ val appVersion = Uri .encode(" v${BuildConfig .VERSION_NAME } (${BuildConfig .VERSION_CODE } )" )
547+ val device = Uri .encode(" ${Build .MANUFACTURER } ${Build .MODEL } " )
548+ val androidVersion = Uri .encode(" ${Build .ID } (${Build .DISPLAY } )" )
549+ val appSource = Uri .encode(
550+ when {
551+ BuildConfig .PLAY_BUILD -> " Play"
552+ else -> " GitHub"
553+ }
548554 )
555+ val url = " https://github.com/kavishdevar/librepods/issues/new" +
556+ " ?template=01-bug-report-android.yml" +
557+ " &app-source=$appSource " +
558+ " &app-version=$appVersion " +
559+ " &device=$device " +
560+ " &android-version=$androidVersion "
561+
562+ val intent = Intent (Intent .ACTION_VIEW , url.toUri())
549563 context.startActivity(intent)
550564 },
551565 independent = false
You can’t perform that action at this time.
0 commit comments