From b97f85e14959118bb36a82eba0dfea7cee498dda Mon Sep 17 00:00:00 2001 From: Kevin Schildhorn Date: Thu, 24 Oct 2024 12:04:04 -0400 Subject: [PATCH] formatting --- android/build.gradle.kts | 5 ++++- .../co/touchlab/droidcon/android/MainActivity.kt | 12 ++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/android/build.gradle.kts b/android/build.gradle.kts index 24540f66..a3c5aaeb 100644 --- a/android/build.gradle.kts +++ b/android/build.gradle.kts @@ -47,7 +47,10 @@ android { if (releaseEnabled) { getByName("release") { isMinifyEnabled = false - proguardFiles(getDefaultProguardFile("proguard-android-optimize.txt"), "proguard-rules.pro") + proguardFiles( + getDefaultProguardFile("proguard-android-optimize.txt"), + "proguard-rules.pro" + ) signingConfig = signingConfigs.getByName("release") } } diff --git a/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt b/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt index 86e57adf..07d5cc68 100644 --- a/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt +++ b/android/src/main/java/co/touchlab/droidcon/android/MainActivity.kt @@ -154,8 +154,16 @@ class MainActivity : ComponentActivity(), KoinComponent { private fun askNotificationPermission() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.TIRAMISU) { - if (ContextCompat.checkSelfPermission(this, Manifest.permission.POST_NOTIFICATIONS) == PackageManager.PERMISSION_GRANTED) { - } else if (false && shouldShowRequestPermissionRationale(Manifest.permission.POST_NOTIFICATIONS)) { + if ( + ContextCompat.checkSelfPermission( + this, + Manifest.permission.POST_NOTIFICATIONS + ) == PackageManager.PERMISSION_GRANTED + ) { + } else if ( + false && + shouldShowRequestPermissionRationale(Manifest.permission.POST_NOTIFICATIONS) + ) { // TODO: display an educational UI explaining to the user the features that will be enabled // by them granting the POST_NOTIFICATION permission. This UI should provide the user // "OK" and "No thanks" buttons. If the user selects "OK," directly request the permission.