mirror of
https://github.com/CherretGit/zaprett-app.git
synced 2026-01-08 20:09:41 +05:00
Bug Fixing, Firebase Analytics
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user