mirror of
https://github.com/AdrianKuta/KahootQuiz.git
synced 2025-09-17 02:24:22 +02:00
Refactor: Move background image to main App composable and cleanup
This commit refactors the placement of the background image, moving it from `QuizScreen` to the main `KahootQuizApp` composable. This ensures the background is consistently applied across the app. Additionally, this commit includes: - Removal of unused Detekt configuration file (`ui/quiz/config/detekt/detekt.yml`). - Minor code cleanup: - Removed commented-out code in `Theme.kt` and `Type.kt`. - Removed trailing blank lines in various domain model files. - Added `@file:Suppress("TooManyFunctions")` to `QuizMapper.kt`. - Added `@file:Suppress("MatchingDeclarationName")` to `QuizNavigation.kt`. - Used `1.seconds` instead of `1000` (Long) for delay in `QuizScreenViewModel`.
This commit is contained in:
@@ -1,11 +1,16 @@
|
||||
package dev.adriankuta.kahootquiz
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.layout.WindowInsets
|
||||
import androidx.compose.foundation.layout.fillMaxSize
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.layout.safeDrawing
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.layout.ContentScale
|
||||
import androidx.compose.ui.res.painterResource
|
||||
import dev.adriankuta.kahootquiz.core.designsystem.R as DesignR
|
||||
|
||||
@Composable
|
||||
fun KahootQuizApp(
|
||||
@@ -15,6 +20,12 @@ fun KahootQuizApp(
|
||||
contentWindowInsets = WindowInsets.safeDrawing,
|
||||
modifier = modifier,
|
||||
) { paddingValues ->
|
||||
KahootQuizNavGraph(modifier = modifier.padding(paddingValues))
|
||||
Image(
|
||||
painter = painterResource(id = DesignR.drawable.bg_image),
|
||||
contentDescription = null,
|
||||
contentScale = ContentScale.Crop,
|
||||
modifier = Modifier.fillMaxSize(),
|
||||
)
|
||||
KahootQuizNavGraph(modifier = Modifier.padding(paddingValues))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -20,4 +20,4 @@ fun KahootQuizNavGraph(
|
||||
) {
|
||||
quizScreen()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user