Finish initial work

This commit is contained in:
Henry Hiles 2023-03-20 19:58:16 -04:00
parent 93067a4599
commit fe491e44bf
3 changed files with 7 additions and 3 deletions

View file

@ -28,5 +28,6 @@
<inspection_tool class="PreviewPickerAnnotation" enabled="true" level="ERROR" enabled_by_default="true">
<option name="composableFile" value="true" />
</inspection_tool>
<inspection_tool class="UnstableApiUsage" enabled="false" level="WARNING" enabled_by_default="false" />
</profile>
</component>

View file

@ -22,7 +22,7 @@ android {
buildTypes {
named("release") {
isMinifyEnabled = false
isMinifyEnabled = true
setProguardFiles(
listOf(
getDefaultProguardFile("proguard-android-optimize.txt"),
@ -30,6 +30,10 @@ android {
)
)
}
named("debug") {
isMinifyEnabled = false
applicationIdSuffix = ".debug"
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8

View file

@ -9,7 +9,6 @@ import android.content.pm.PackageManager
import android.os.Bundle
import android.util.Size
import android.webkit.URLUtil
import android.widget.Toast
import androidx.activity.ComponentActivity
import androidx.activity.compose.rememberLauncherForActivityResult
import androidx.activity.compose.setContent
@ -51,6 +50,7 @@ class MainActivity : ComponentActivity() {
}
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable
fun Screen() {
var code by remember { mutableStateOf("") }
@ -95,7 +95,6 @@ fun Screen() {
}
LaunchedEffect(key1 = code) {
Toast.makeText(context, "Test $doNotAsk $code", Toast.LENGTH_LONG).show()
if (doNotAsk && URLUtil.isValidUrl(code)) {
uriHandler.openUri(code)
code = ""