mirror of
https://github.com/CherretGit/zaprett-app.git
synced 2026-01-28 22:39:38 +05:00
Bug Fixing, Firebase Analytics
This commit is contained in:
@@ -2,6 +2,8 @@ plugins {
|
||||
alias(libs.plugins.android.application)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
alias(libs.plugins.kotlin.compose)
|
||||
id("com.google.gms.google-services")
|
||||
id("com.google.firebase.crashlytics")
|
||||
}
|
||||
|
||||
android {
|
||||
@@ -12,8 +14,8 @@ android {
|
||||
applicationId = "com.cherret.zaprett"
|
||||
minSdk = 30
|
||||
targetSdk = 35
|
||||
versionCode = 4
|
||||
versionName = "1.3"
|
||||
versionCode = 5
|
||||
versionName = "1.4"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
@@ -48,6 +50,9 @@ dependencies {
|
||||
implementation ("com.github.topjohnwu.libsu:core:6.0.0")
|
||||
implementation("com.squareup.okhttp3:okhttp:5.0.0-alpha.14")
|
||||
implementation("com.squareup.moshi:moshi-kotlin:1.15.2")
|
||||
implementation(platform("com.google.firebase:firebase-bom:33.12.0"))
|
||||
implementation("com.google.firebase:firebase-analytics")
|
||||
implementation("com.google.firebase:firebase-crashlytics")
|
||||
implementation(libs.androidx.core.ktx)
|
||||
implementation(libs.androidx.lifecycle.runtime.ktx)
|
||||
implementation(libs.androidx.activity.compose)
|
||||
|
||||
@@ -30,6 +30,7 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.core.content.edit
|
||||
import androidx.navigation.NavGraph.Companion.findStartDestination
|
||||
import androidx.navigation.compose.NavHost
|
||||
import androidx.navigation.compose.composable
|
||||
@@ -39,7 +40,9 @@ import com.cherret.zaprett.ui.screens.HomeScreen
|
||||
import com.cherret.zaprett.ui.screens.HostsScreen
|
||||
import com.cherret.zaprett.ui.screens.SettingsScreen
|
||||
import com.cherret.zaprett.ui.theme.ZaprettTheme
|
||||
import androidx.core.content.edit
|
||||
import com.google.firebase.Firebase
|
||||
import com.google.firebase.analytics.FirebaseAnalytics
|
||||
import com.google.firebase.analytics.analytics
|
||||
|
||||
sealed class Screen(val route: String, @StringRes val nameResId: Int, val icon: androidx.compose.ui.graphics.vector.ImageVector) {
|
||||
object home : Screen("home", R.string.title_home, Icons.Default.Home)
|
||||
@@ -48,8 +51,10 @@ sealed class Screen(val route: String, @StringRes val nameResId: Int, val icon:
|
||||
}
|
||||
val topLevelRoutes = listOf(Screen.home, Screen.hosts, Screen.settings)
|
||||
class MainActivity : ComponentActivity() {
|
||||
private lateinit var firebaseAnalytics: FirebaseAnalytics
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
firebaseAnalytics = Firebase.analytics
|
||||
enableEdgeToEdge()
|
||||
setContent {
|
||||
ZaprettTheme {
|
||||
|
||||
@@ -10,6 +10,7 @@ import androidx.activity.result.contract.ActivityResultContracts
|
||||
import androidx.compose.foundation.Canvas
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.Column
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@@ -125,7 +126,9 @@ fun HostsScreen() {
|
||||
},
|
||||
modifier = Modifier
|
||||
) {
|
||||
LazyColumn {
|
||||
LazyColumn (
|
||||
contentPadding = PaddingValues(bottom = 25.dp)
|
||||
){
|
||||
items(allLists) { item ->
|
||||
ElevatedCard(
|
||||
elevation = CardDefaults.cardElevation(
|
||||
|
||||
@@ -190,7 +190,7 @@ fun useModule(context: Context, checked: Boolean, updateOnBoot: MutableState<Boo
|
||||
else {
|
||||
editor.putBoolean("use_module", false).putBoolean("update_on_boot", false).apply()
|
||||
updateOnBoot.value = false
|
||||
return true
|
||||
callback(true)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
@@ -3,4 +3,6 @@ plugins {
|
||||
alias(libs.plugins.android.application) apply false
|
||||
alias(libs.plugins.kotlin.android) apply false
|
||||
alias(libs.plugins.kotlin.compose) apply false
|
||||
id("com.google.gms.google-services") version "4.4.2" apply false
|
||||
id("com.google.firebase.crashlytics") version "3.0.3" apply false
|
||||
}
|
||||
Reference in New Issue
Block a user