diff --git a/.mega-linter.yml b/.mega-linter.yml index f9d276d8..6eff1ff3 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -29,6 +29,6 @@ FILEIO_REPORTER: false # DISABLE_ERRORS: true MARKDOWN_MARKDOWNLINT_CONFIG_FILE: .markdownlint.json MARKDOWN_MARKDOWNLINT_DISABLE_ERRORS: false -KOTLIN_DETEKT_ARGUMENTS: -c config/detekt/detekt.yml -ex "**/build/**" -p "lib/detekt-formatting-1.23.7.jar" +KOTLIN_DETEKT_ARGUMENTS: -c config/detekt/detekt.yml -ex "**/build/**" DISABLE_ERRORS: true diff --git a/build-logic/build.gradle.kts b/build-logic/build.gradle.kts index 60ad58e5..9da79024 100644 --- a/build-logic/build.gradle.kts +++ b/build-logic/build.gradle.kts @@ -19,4 +19,4 @@ dependencies { implementation(libs.serialization) implementation(libs.com.google.devtools.ksp.gradle.plugin) implementation(libs.popcorn.guineapig) -} \ No newline at end of file +} diff --git a/build-logic/src/main/java/Config.kt b/build-logic/src/main/java/Config.kt index 6c70860f..f4f99b92 100644 --- a/build-logic/src/main/java/Config.kt +++ b/build-logic/src/main/java/Config.kt @@ -1,3 +1,4 @@ +@file:Suppress("MaxLineLength") import org.gradle.api.JavaVersion import org.jetbrains.kotlin.gradle.dsl.JvmTarget @@ -9,7 +10,7 @@ object Config { const val compileSdkVersion = 36 const val minSdkVersion = 28 const val targetSdkVersion = 36 - const val versionName = "1.3" + const val versionName = "1.4" const val versionCode = 1 const val testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" @@ -23,9 +24,9 @@ object Config { private const val tmdb_token_name_release = "TMDB_BEARER_TOKEN_RELEASE" private const val bearear_without_environment = "eyJhbGciOiJIUzI1NiJ9.eyJhdWQiOiJiNDg2NWM4YTAzNzhmM2I4NjI0OWU1ZjNiYWFiMjU2NyIsInN1YiI6IjY0Mjk4YTg5YTNlNGJhMWM0NDgzM2U4OCIsInNjb3BlcyI6WyJhcGlfcmVhZCJdLCJ2ZXJzaW9uIjoxfQ.9cIxv29vkaZ2yW88DIFRUFK_nXbK2b6KS8t96kA8WAE" - val api_bearer = System.getenv(tmdb_token_name_debug) ?: bearear_without_environment val api_bearer_debug = System.getenv(tmdb_token_name_debug) ?: bearear_without_environment - val api_bearer_release = System.getenv(tmdb_token_name_release) ?: bearear_without_environment + val api_bearer_release = + System.getenv(tmdb_token_name_release) ?: bearear_without_environment } -} \ No newline at end of file +} diff --git a/build-logic/src/main/java/com.streamplayer.detekt.gradle.kts b/build-logic/src/main/java/com.streamplayer.detekt.gradle.kts index 12b63d2a..d66df7fb 100644 --- a/build-logic/src/main/java/com.streamplayer.detekt.gradle.kts +++ b/build-logic/src/main/java/com.streamplayer.detekt.gradle.kts @@ -13,4 +13,4 @@ detekt { "src/test/kotlin" ) -} \ No newline at end of file +} diff --git a/build-logic/src/main/java/com.streamplayer.dokka.gradle.kts b/build-logic/src/main/java/com.streamplayer.dokka.gradle.kts index f35b084e..c3621e10 100644 --- a/build-logic/src/main/java/com.streamplayer.dokka.gradle.kts +++ b/build-logic/src/main/java/com.streamplayer.dokka.gradle.kts @@ -2,4 +2,4 @@ allprojects { apply(plugin = "org.jetbrains.dokka") -} \ No newline at end of file +} diff --git a/build-logic/src/main/java/com.streamplayer.koin-annotations-setup.gradle.kts b/build-logic/src/main/java/com.streamplayer.koin-annotations-setup.gradle.kts index 1a688d6d..dfddc2e5 100644 --- a/build-logic/src/main/java/com.streamplayer.koin-annotations-setup.gradle.kts +++ b/build-logic/src/main/java/com.streamplayer.koin-annotations-setup.gradle.kts @@ -50,4 +50,4 @@ afterEvaluate { ksp { arg("KOIN_CONFIG_CHECK", "true") -} \ No newline at end of file +} diff --git a/build-logic/src/main/java/extensions/CommonExtensions.kt b/build-logic/src/main/java/extensions/CommonExtensions.kt index 6411ce63..9056fb14 100644 --- a/build-logic/src/main/java/extensions/CommonExtensions.kt +++ b/build-logic/src/main/java/extensions/CommonExtensions.kt @@ -54,4 +54,4 @@ internal val Project.libs: VersionCatalog get() { return project.extensions.getByType() .named("libs") - } \ No newline at end of file + } diff --git a/build-logic/src/main/java/extensions/DependecyHandlerExtensions.kt b/build-logic/src/main/java/extensions/DependecyHandlerExtensions.kt index 45652996..816de6bf 100644 --- a/build-logic/src/main/java/extensions/DependecyHandlerExtensions.kt +++ b/build-logic/src/main/java/extensions/DependecyHandlerExtensions.kt @@ -3,5 +3,6 @@ package extensions import org.gradle.api.artifacts.Dependency import org.gradle.api.artifacts.dsl.DependencyHandler +@Suppress("FunctionNaming") fun DependencyHandler.`dokkaPlugin`(dependencyNotation: Any): Dependency? = - add("dokkaPlugin", dependencyNotation) \ No newline at end of file + add("dokkaPlugin", dependencyNotation) diff --git a/build-logic/src/main/java/popcorngp-setup-plugin.gradle.kts b/build-logic/src/main/java/popcorngp-setup-plugin.gradle.kts index cf92980c..69752d98 100644 --- a/build-logic/src/main/java/popcorngp-setup-plugin.gradle.kts +++ b/build-logic/src/main/java/popcorngp-setup-plugin.gradle.kts @@ -34,4 +34,4 @@ popcornGuineapigParentConfig { ), ), ) -} \ No newline at end of file +} diff --git a/build.gradle.kts b/build.gradle.kts index 3d901897..c3456e7b 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -30,4 +30,4 @@ allprojects { url = URI.create("https://jitpack.io") } } -} \ No newline at end of file +} diff --git a/composeApp/build.gradle.kts b/composeApp/build.gradle.kts index b5d39042..0337f0a5 100644 --- a/composeApp/build.gradle.kts +++ b/composeApp/build.gradle.kts @@ -44,4 +44,4 @@ kotlin { implementation(libs.kotzilla.sdk.compose) } } -} \ No newline at end of file +} diff --git a/composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp/presentation/CustomApplication.kt b/composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp/presentation/CustomApplication.kt index f0aca4ff..208a88c7 100644 --- a/composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp/presentation/CustomApplication.kt +++ b/composeApp/src/androidMain/kotlin/com.codandotv.streamplayerapp/presentation/CustomApplication.kt @@ -32,4 +32,4 @@ class CustomApplication : Application() { ) ) } -} \ No newline at end of file +} diff --git a/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt b/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt index 1a833be2..cdebe0ed 100644 --- a/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt +++ b/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/di/AppModule.kt @@ -14,5 +14,9 @@ object AppModule { private val module = module { single(QualifierDispatcherIO) { Dispatchers.IO } } - val list = module + NetworkModule().module + LocalStorageModule.module + SyncModule.module + ListStreamModule.module -} \ No newline at end of file + val list = module + + NetworkModule().module + + LocalStorageModule.module + + SyncModule.module + + ListStreamModule.module +} diff --git a/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieComponentPlatform.kt b/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieComponentPlatform.kt index 56f103ff..68a7f4f7 100644 --- a/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieComponentPlatform.kt +++ b/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieComponentPlatform.kt @@ -8,4 +8,4 @@ expect fun LottieComponent( jsonString: String, modifier: Modifier = Modifier, onAnimationFinished: () -> Unit -) \ No newline at end of file +) diff --git a/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/presentation/navigation/SplashNavigation.kt b/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/presentation/navigation/SplashNavigation.kt index b638c384..1813487a 100644 --- a/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/presentation/navigation/SplashNavigation.kt +++ b/composeApp/src/commonMain/kotlin/com.codandotv.streamplayerapp/presentation/navigation/SplashNavigation.kt @@ -20,4 +20,4 @@ fun NavGraphBuilder.splashNavGraph(navController: NavHostController) { } ) } -} \ No newline at end of file +} diff --git a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/MainViewController.kt b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/MainViewController.kt index 2332ac68..36d92613 100644 --- a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/MainViewController.kt +++ b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/MainViewController.kt @@ -2,6 +2,7 @@ package com.codandotv.streamplayerapp import androidx.compose.ui.window.ComposeUIViewController +@Suppress("FunctionNaming") fun MainViewController() = ComposeUIViewController { StreamPlayerApp() -} \ No newline at end of file +} diff --git a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt index 01d00e2f..cfe2292a 100644 --- a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt +++ b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/di/KoinIosHelper.kt @@ -21,4 +21,4 @@ class KoinIosHelper { ) } } -} \ No newline at end of file +} diff --git a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieComponentPlatform.ios.kt b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieComponentPlatform.ios.kt index 9ed08746..3d95d39c 100644 --- a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieComponentPlatform.ios.kt +++ b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieComponentPlatform.ios.kt @@ -23,4 +23,4 @@ actual fun LottieComponent( view } ) -} \ No newline at end of file +} diff --git a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieViewProvider.kt b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieViewProvider.kt index f1bf123d..c2d0ea37 100644 --- a/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieViewProvider.kt +++ b/composeApp/src/iosMain/kotlin/com.codandotv.streamplayerapp/presentation/components/LottieViewProvider.kt @@ -4,4 +4,4 @@ import platform.UIKit.UIView interface LottieViewProvider { fun provideLottieView(lottieAnimationJson: String, onAnimationFinish : () -> Unit) : UIView -} \ No newline at end of file +} diff --git a/config/detekt/detekt.yml b/config/detekt/detekt.yml index 22d16e30..d29861df 100644 --- a/config/detekt/detekt.yml +++ b/config/detekt/detekt.yml @@ -320,7 +320,7 @@ exceptions: ObjectExtendsThrowable: active: false PrintStackTrace: - active: false + active: true RethrowCaughtException: active: true ReturnFromFinally: @@ -402,11 +402,6 @@ naming: ClassNaming: active: true classPattern: "[A-Z][a-zA-Z0-9]*" - ConstructorParameterNaming: - active: true - parameterPattern: "[a-z][A-Za-z0-9]*" - privateParameterPattern: "[a-z][A-Za-z0-9]*" - excludeClassPattern: "$^" EnumNaming: active: true enumEntryPattern: "[A-Z][_a-zA-Z0-9]*" @@ -440,15 +435,10 @@ naming: parameterPattern: "[a-z][A-Za-z0-9]*" excludeClassPattern: "$^" InvalidPackageDeclaration: - active: true - rootPackage: "" - requireRootInDeclaration: false + active: false LambdaParameterNaming: active: false parameterPattern: "[a-z][A-Za-z0-9]*|_" - MatchingDeclarationName: - active: true - mustBeFirst: true MemberNameEqualsClassName: active: true ignoreOverridden: true @@ -463,7 +453,6 @@ naming: privatePropertyPattern: "(_)?[A-Za-z][_A-Za-z0-9]*" PackageNaming: active: false - packagePattern: '[a-z]+(\.[a-z][A-Za-z0-9]*)*' TopLevelPropertyNaming: active: true constantPattern: "[A-Z][_A-Z0-9]*" @@ -741,7 +730,7 @@ style: ignoreOverridden: false ignoreUsageInGenerics: false FunctionOnlyReturningConstant: - active: false + active: true ignoreOverridableFunction: true ignoreActualFunction: true excludedFunctions: [] @@ -749,34 +738,7 @@ style: active: true maxJumpCount: 1 MagicNumber: - active: true - excludes: - [ - "**/test/**", - "**/androidTest/**", - "**/commonTest/**", - "**/jvmTest/**", - "**/androidUnitTest/**", - "**/androidInstrumentedTest/**", - "**/jsTest/**", - "**/iosTest/**", - "**/*.kts", - ] - ignoreNumbers: - - "-1" - - "0" - - "1" - - "2" - ignoreHashCodeFunction: true - ignorePropertyDeclaration: false - ignoreLocalVariableDeclaration: false - ignoreConstantDeclaration: true - ignoreCompanionObjectPropertyDeclaration: true - ignoreAnnotation: false - ignoreNamedArgument: true - ignoreEnums: false - ignoreRanges: false - ignoreExtensionFunctions: true + active: false MandatoryBracesLoops: active: false MaxChainedCallsOnSameLine: @@ -804,7 +766,7 @@ style: NestedClassesVisibility: active: true NewLineAtEndOfFile: - active: false + active: true NoTabs: active: false NullableBooleanCheck: @@ -934,4 +896,4 @@ style: WildcardImport: active: true excludeImports: - - "java.util.*" + - "java.util.*" \ No newline at end of file diff --git a/core-background-work/build.gradle.kts b/core-background-work/build.gradle.kts index b55e44b0..cc6b2cff 100644 --- a/core-background-work/build.gradle.kts +++ b/core-background-work/build.gradle.kts @@ -20,4 +20,4 @@ kotlin { api(libs.kmpnotifier) } } -} \ No newline at end of file +} diff --git a/core-background-work/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_background_work/worker/SyncWorker.kt b/core-background-work/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_background_work/worker/SyncWorker.kt index 59fe012b..298d5a11 100644 --- a/core-background-work/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_background_work/worker/SyncWorker.kt +++ b/core-background-work/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_background_work/worker/SyncWorker.kt @@ -15,12 +15,9 @@ class SyncWorker( private val syncManager: SyncManager by inject() override suspend fun doWork(): Result { - return try { + return runCatching { syncManager.syncData() Result.success() - } catch (e: Exception) { - println("Erro no SyncWorker ${e.message}") - Result.retry() - } + }.getOrDefault(Result.retry()) } } diff --git a/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/NotifierHelper.kt b/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/NotifierHelper.kt index 08ca362d..ae487888 100644 --- a/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/NotifierHelper.kt +++ b/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/NotifierHelper.kt @@ -23,4 +23,4 @@ object NotifierHelper { image = NotificationImage.Url(imageUrl) } } -} \ No newline at end of file +} diff --git a/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/SyncManager.kt b/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/SyncManager.kt index a43aa783..83fea714 100644 --- a/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/SyncManager.kt +++ b/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/SyncManager.kt @@ -25,4 +25,4 @@ class SyncManager( delay(2000) println("SyncManager: Sincronização concluída!") } -} \ No newline at end of file +} diff --git a/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/di/SyncModule.kt b/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/di/SyncModule.kt index 09e6a66d..2acae685 100644 --- a/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/di/SyncModule.kt +++ b/core-background-work/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_background_work/di/SyncModule.kt @@ -7,4 +7,4 @@ object SyncModule { val module = module(createdAtStart = true) { single { SyncManager(get()) } } -} \ No newline at end of file +} diff --git a/core-camera-gallery/build.gradle.kts b/core-camera-gallery/build.gradle.kts index 959dd7a8..96fe7312 100644 --- a/core-camera-gallery/build.gradle.kts +++ b/core-camera-gallery/build.gradle.kts @@ -20,4 +20,4 @@ kotlin { } } } -} \ No newline at end of file +} diff --git a/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt b/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt index d3690fd5..0f994b17 100644 --- a/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt +++ b/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt @@ -17,4 +17,4 @@ actual class SharedImage(private val bitmap: Bitmap?) { actual fun toImageBitmap(): ImageBitmap? { return bitmap?.asImageBitmap() } -} \ No newline at end of file +} diff --git a/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.android.kt b/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.android.kt index 9381950b..9f642570 100644 --- a/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.android.kt +++ b/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.android.kt @@ -45,4 +45,4 @@ actual class CameraManager actual constructor( actual fun launch() { onLaunch() } -} \ No newline at end of file +} diff --git a/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/ComposeFileProvider.kt b/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/ComposeFileProvider.kt index 540fede4..248a9acc 100644 --- a/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/ComposeFileProvider.kt +++ b/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/ComposeFileProvider.kt @@ -28,4 +28,4 @@ class ComposeFileProvider : FileProvider( ) }.getOrNull() } -} \ No newline at end of file +} diff --git a/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/gallery/GalleryManager.android.kt b/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/gallery/GalleryManager.android.kt index 81701371..3e4fdd67 100644 --- a/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/gallery/GalleryManager.android.kt +++ b/core-camera-gallery/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/gallery/GalleryManager.android.kt @@ -35,4 +35,4 @@ actual class GalleryManager actual constructor(private val onLaunch: () -> Unit) actual fun launch() { onLaunch() } -} \ No newline at end of file +} diff --git a/core-camera-gallery/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt b/core-camera-gallery/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt index be934ded..465b27e1 100644 --- a/core-camera-gallery/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt +++ b/core-camera-gallery/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt @@ -5,4 +5,4 @@ import androidx.compose.ui.graphics.ImageBitmap expect class SharedImage { fun toByteArray(): ByteArray? fun toImageBitmap(): ImageBitmap? -} \ No newline at end of file +} diff --git a/core-camera-gallery/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.kt b/core-camera-gallery/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.kt index b85a29a2..d144844e 100644 --- a/core-camera-gallery/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.kt +++ b/core-camera-gallery/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.kt @@ -11,4 +11,4 @@ expect class CameraManager( onLaunch: () -> Unit ) { fun launch() -} \ No newline at end of file +} diff --git a/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt b/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt index 24df0006..25769ff4 100644 --- a/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt +++ b/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/SharedImage.kt @@ -41,4 +41,4 @@ actual class SharedImage(private val image: UIImage?) { private companion object { const val COMPRESSION_QUALITY = 0.99 } -} \ No newline at end of file +} diff --git a/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.ios.kt b/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.ios.kt index 00f36236..f00423e6 100644 --- a/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.ios.kt +++ b/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/camera/CameraManager.ios.kt @@ -37,7 +37,9 @@ actual fun rememberCameraManager(onResult: (SharedImage?) -> Unit): CameraManage CameraManager { imagePicker.setSourceType(UIImagePickerControllerSourceType.UIImagePickerControllerSourceTypeCamera) imagePicker.setAllowsEditing(true) - imagePicker.setCameraCaptureMode(UIImagePickerControllerCameraCaptureMode.UIImagePickerControllerCameraCaptureModePhoto) + imagePicker.setCameraCaptureMode( + UIImagePickerControllerCameraCaptureMode.UIImagePickerControllerCameraCaptureModePhoto + ) imagePicker.setDelegate(cameraDelegate) UIApplication.sharedApplication.keyWindow?.rootViewController?.presentViewController( imagePicker, true, null @@ -52,4 +54,4 @@ actual class CameraManager actual constructor( actual fun launch() { onLaunch() } -} \ No newline at end of file +} diff --git a/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/gallery/GalleryManager.ios.kt b/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/gallery/GalleryManager.ios.kt index 0f6aa3f0..125a9007 100644 --- a/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/gallery/GalleryManager.ios.kt +++ b/core-camera-gallery/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_camera_gallery/gallery/GalleryManager.ios.kt @@ -49,4 +49,4 @@ actual class GalleryManager actual constructor(private val onLaunch: () -> Unit) actual fun launch() { onLaunch() } -} \ No newline at end of file +} diff --git a/core-local-storage/build.gradle.kts b/core-local-storage/build.gradle.kts index d3b47547..408d1805 100644 --- a/core-local-storage/build.gradle.kts +++ b/core-local-storage/build.gradle.kts @@ -24,4 +24,4 @@ dependencies { room { schemaDirectory("$projectDir/schemas") -} \ No newline at end of file +} diff --git a/core-local-storage/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.android.kt b/core-local-storage/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.android.kt index 8540c5f0..ca347ace 100644 --- a/core-local-storage/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.android.kt +++ b/core-local-storage/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.android.kt @@ -7,6 +7,6 @@ actual fun databaseInstance(): AppDatabase { return Room.databaseBuilder( KoinPlatform.getKoin().get(), AppDatabase::class.java, - dbFileName + DB_FILE_NAME ).build() -} \ No newline at end of file +} diff --git a/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/dao/FavoriteDao.kt b/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/dao/FavoriteDao.kt index ccdf7e79..f2a759de 100644 --- a/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/dao/FavoriteDao.kt +++ b/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/dao/FavoriteDao.kt @@ -17,4 +17,4 @@ interface FavoriteDao { @Query("""DELETE FROM movie WHERE id = :favoriteMovie""") suspend fun delete(favoriteMovie: String) -} \ No newline at end of file +} diff --git a/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.kt b/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.kt index 64f0a620..58ea6b4d 100644 --- a/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.kt +++ b/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.kt @@ -7,7 +7,6 @@ import androidx.room.RoomDatabaseConstructor import com.codandotv.streamplayerapp.core_local_storage.data.dao.FavoriteDao import com.codandotv.streamplayerapp.core_local_storage.domain.model.MovieEntity - @Database(entities = [MovieEntity::class], version = 1, exportSchema = false) @ConstructedBy(AppDatabaseConstructor::class) abstract class AppDatabase : RoomDatabase() { @@ -22,4 +21,4 @@ expect object AppDatabaseConstructor : RoomDatabaseConstructor { expect fun databaseInstance(): AppDatabase -internal const val dbFileName = "app-database.db" \ No newline at end of file +internal const val DB_FILE_NAME = "app-database.db" diff --git a/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/di/LocalStorageModule.kt b/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/di/LocalStorageModule.kt index 9d934c0d..d836b517 100644 --- a/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/di/LocalStorageModule.kt +++ b/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/di/LocalStorageModule.kt @@ -9,4 +9,4 @@ object LocalStorageModule { single { databaseInstance() } single { get().favoriteDao() } } -} \ No newline at end of file +} diff --git a/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/domain/model/MovieEntity.kt b/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/domain/model/MovieEntity.kt index 58654d1e..c81bb34e 100644 --- a/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/domain/model/MovieEntity.kt +++ b/core-local-storage/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/domain/model/MovieEntity.kt @@ -12,4 +12,4 @@ data class MovieEntity( @ColumnInfo("tagline") val tagline: String, @ColumnInfo("url") val url: String, @ColumnInfo("release_year")val releaseYear: String -) \ No newline at end of file +) diff --git a/core-local-storage/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.ios.kt b/core-local-storage/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.ios.kt index 469b746b..442e6682 100644 --- a/core-local-storage/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.ios.kt +++ b/core-local-storage/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_local_storage/data/database/AppDatabasePlatform.ios.kt @@ -24,7 +24,7 @@ private fun documentDirectory(): String { } actual fun databaseInstance(): AppDatabase { - val dbFile = "${documentDirectory()}/$dbFileName" + val dbFile = "${documentDirectory()}/$DB_FILE_NAME" return Room.databaseBuilder( name = dbFile, factory = { findDatabaseConstructorAndInitDatabaseImpl(AppDatabase::class) } diff --git a/core-navigation/build.gradle.kts b/core-navigation/build.gradle.kts index 35eaac58..8171fde1 100644 --- a/core-navigation/build.gradle.kts +++ b/core-navigation/build.gradle.kts @@ -11,4 +11,4 @@ kotlin { implementation(libs.bundles.compose) } } -} \ No newline at end of file +} diff --git a/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/bottomnavigation/BottomNavItem.kt b/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/bottomnavigation/BottomNavItem.kt index 96c2e576..752441dd 100644 --- a/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/bottomnavigation/BottomNavItem.kt +++ b/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/bottomnavigation/BottomNavItem.kt @@ -53,4 +53,4 @@ sealed class BottomNavItem( Res.drawable.ic_downloads_selected, BottomNavRoutes.DOWNLOADS ) -} \ No newline at end of file +} diff --git a/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/bottomnavigation/StreamPlayerBottomNavigation.kt b/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/bottomnavigation/StreamPlayerBottomNavigation.kt index 5cc4601d..9a50e77e 100644 --- a/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/bottomnavigation/StreamPlayerBottomNavigation.kt +++ b/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/bottomnavigation/StreamPlayerBottomNavigation.kt @@ -83,4 +83,4 @@ private fun onItemClicked( launchSingleTop = true restoreState = true } -} \ No newline at end of file +} diff --git a/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/helper/NavigationHelper.kt b/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/helper/NavigationHelper.kt index 4039b98e..105d79c8 100644 --- a/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/helper/NavigationHelper.kt +++ b/core-navigation/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_navigation/helper/NavigationHelper.kt @@ -9,4 +9,4 @@ import androidx.navigation.compose.currentBackStackEntryAsState fun currentRoute(navController: NavController): String? { val navBackStackEntry by navController.currentBackStackEntryAsState() return navBackStackEntry?.destination?.route -} \ No newline at end of file +} diff --git a/core-networking/build.gradle.kts b/core-networking/build.gradle.kts index c9c6e98f..98fd7cd4 100644 --- a/core-networking/build.gradle.kts +++ b/core-networking/build.gradle.kts @@ -50,4 +50,4 @@ kotlin { implementation(libs.ktor.client.darwin) } } -} \ No newline at end of file +} diff --git a/core-networking/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.android.kt b/core-networking/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.android.kt index 5373464e..3adf371a 100644 --- a/core-networking/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.android.kt +++ b/core-networking/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.android.kt @@ -4,4 +4,4 @@ import io.ktor.client.engine.HttpClientEngine import io.ktor.client.engine.okhttp.OkHttpConfig import io.ktor.client.engine.okhttp.OkHttpEngine -actual fun httpClientEnginePlatform() : HttpClientEngine = OkHttpEngine(OkHttpConfig()) \ No newline at end of file +actual fun httpClientEnginePlatform() : HttpClientEngine = OkHttpEngine(OkHttpConfig()) diff --git a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientBuilder.kt b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientBuilder.kt index 40d86e73..c3dd4fe0 100644 --- a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientBuilder.kt +++ b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientBuilder.kt @@ -62,7 +62,6 @@ internal object HttpClientBuilder { level = LogLevel.ALL logger = object : Logger { override fun log(message: String) { - //TODO: Migrar Logs para Utilizar Kermit println("HttpClient${message}") } } @@ -91,4 +90,4 @@ internal object HttpClientBuilder { } } } -} \ No newline at end of file +} diff --git a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.kt b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.kt index 40eb9de0..4096cb84 100644 --- a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.kt +++ b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.kt @@ -2,4 +2,4 @@ package com.codandotv.streamplayerapp.core_networking import io.ktor.client.engine.HttpClientEngine -expect fun httpClientEnginePlatform(): HttpClientEngine \ No newline at end of file +expect fun httpClientEnginePlatform(): HttpClientEngine diff --git a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/di/NetworkModule.kt b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/di/NetworkModule.kt index 0dcef65e..82334c45 100644 --- a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/di/NetworkModule.kt +++ b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/di/NetworkModule.kt @@ -28,4 +28,4 @@ class NetworkModule { internal object Network { const val TIMEOUT = 10000L -} \ No newline at end of file +} diff --git a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/di/QualifierNetworking.kt b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/di/QualifierNetworking.kt index f5c85fdf..fe2a9482 100644 --- a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/di/QualifierNetworking.kt +++ b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/di/QualifierNetworking.kt @@ -7,4 +7,3 @@ object QualifierProfileHttpClient : Qualifier { override val value: QualifierValue get() = "QualifierProfileRetrofit" } - diff --git a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/handleError/Failure.kt b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/handleError/Failure.kt index f09b8b03..183c6568 100644 --- a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/handleError/Failure.kt +++ b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/handleError/Failure.kt @@ -60,4 +60,4 @@ sealed class Failure( ) : Failure( codeStatus, throwable?.message ) -} \ No newline at end of file +} diff --git a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/resources/StringNetworking.kt b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/resources/StringNetworking.kt index b7edb0a2..8c2341eb 100644 --- a/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/resources/StringNetworking.kt +++ b/core-networking/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_networking/resources/StringNetworking.kt @@ -7,7 +7,9 @@ import streamplayerapp_kmp.core_networking.generated.resources.core_networking_n import streamplayerapp_kmp.core_networking.generated.resources.core_networking_no_data_content import streamplayerapp_kmp.core_networking.generated.resources.core_networking_no_server_error -//Note: done this to search for strings in the innermost layers because you can't use them because they are not composable +// Note: done this to search for strings in the innermost +// layers because you can't use them because they are not +// composable object StringNetworking { internal fun msgDefaultErrorKey(): String = Res.string.core_networking_msg_default_error.key internal fun msgNoDataContentKey(): String = Res.string.core_networking_no_data_content.key diff --git a/core-networking/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.ios.kt b/core-networking/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.ios.kt index 9470ffa4..5ddce88d 100644 --- a/core-networking/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.ios.kt +++ b/core-networking/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_networking/HttpClientEngineProviderPlatform.ios.kt @@ -5,4 +5,4 @@ import io.ktor.client.engine.darwin.Darwin actual fun httpClientEnginePlatform(): HttpClientEngine { return Darwin.create() -} \ No newline at end of file +} diff --git a/core-permission/build.gradle.kts b/core-permission/build.gradle.kts index 18ec5689..c20e96af 100644 --- a/core-permission/build.gradle.kts +++ b/core-permission/build.gradle.kts @@ -19,4 +19,4 @@ kotlin { } } } -} \ No newline at end of file +} diff --git a/core-permission/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.android.kt b/core-permission/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.android.kt index 356a9987..dde61887 100644 --- a/core-permission/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.android.kt +++ b/core-permission/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.android.kt @@ -13,4 +13,4 @@ internal actual class PermissionFactory : KoinComponent { PermissionsControllerFactory { PermissionsController(applicationContext = context) } -} \ No newline at end of file +} diff --git a/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/di/PermissionsModule.kt b/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/di/PermissionsModule.kt index 12e5a30d..e6cb1bfd 100644 --- a/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/di/PermissionsModule.kt +++ b/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/di/PermissionsModule.kt @@ -12,4 +12,4 @@ object PermissionsModule { ) } } -} \ No newline at end of file +} diff --git a/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionDeniedDialog.kt b/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionDeniedDialog.kt index f183e215..9663b959 100644 --- a/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionDeniedDialog.kt +++ b/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionDeniedDialog.kt @@ -1,6 +1,10 @@ package com.codandotv.streamplayerapp.core_permission.permission -import androidx.compose.material3.* +import androidx.compose.material3.AlertDialog +import androidx.compose.material3.ButtonDefaults.textButtonColors +import androidx.compose.material3.MaterialTheme +import androidx.compose.material3.Text +import androidx.compose.material3.TextButton import androidx.compose.runtime.Composable import org.jetbrains.compose.resources.stringResource import streamplayerapp_kmp.core_permission.generated.resources.Res @@ -19,7 +23,7 @@ fun PermissionDeniedDialog( confirmButton = { TextButton( onClick = onSettingsClick, - colors = ButtonDefaults.textButtonColors( + colors = textButtonColors( contentColor = MaterialTheme.colorScheme.primary ) ) { @@ -32,7 +36,7 @@ fun PermissionDeniedDialog( dismissButton = { TextButton( onClick = onDismiss, - colors = ButtonDefaults.textButtonColors( + colors = textButtonColors( contentColor = MaterialTheme.colorScheme.onSurfaceVariant ) ) { diff --git a/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.kt b/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.kt index c0b811eb..079a2583 100644 --- a/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.kt +++ b/core-permission/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.kt @@ -5,4 +5,4 @@ import dev.icerock.moko.permissions.compose.PermissionsControllerFactory internal expect class PermissionFactory() { fun getPermissionFactory() : PermissionsControllerFactory -} \ No newline at end of file +} diff --git a/core-permission/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.ios.kt b/core-permission/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.ios.kt index 1bc7914b..a1a24952 100644 --- a/core-permission/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.ios.kt +++ b/core-permission/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_permission/permission/PermissionsFactotyPlatform.ios.kt @@ -8,4 +8,4 @@ internal actual class PermissionFactory { PermissionsControllerFactory { PermissionsController() } -} \ No newline at end of file +} diff --git a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/theme/ThemePreviews.kt b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/theme/ThemePreviews.kt index 15bad1d5..c25a6fdf 100644 --- a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/theme/ThemePreviews.kt +++ b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/theme/ThemePreviews.kt @@ -24,4 +24,4 @@ fun ThemePreview( StreamPlayerTheme { Surface { content() } } -} \ No newline at end of file +} diff --git a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.android.kt b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.android.kt index 1b9ab4c2..265a6719 100644 --- a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.android.kt +++ b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.android.kt @@ -1,6 +1,5 @@ package com.codandotv.streamplayerapp.core_shared_ui.utils -import android.content.pm.PackageManager import androidx.compose.runtime.Composable import androidx.compose.ui.platform.LocalContext import com.codandotv.streamplayerapp.core_shared_ui.extension.getPackageInfoCompat @@ -8,10 +7,8 @@ import com.codandotv.streamplayerapp.core_shared_ui.extension.getPackageInfoComp @Composable actual fun isPackageInstalled(packageName: String): Boolean { val pm = LocalContext.current.packageManager - return try { + return runCatching { pm.getPackageInfoCompat(packageName) true - } catch (e: PackageManager.NameNotFoundException) { - false - } -} \ No newline at end of file + }.getOrDefault(false) +} diff --git a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.android.kt b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.android.kt index b6976d4d..8d7fcf9c 100644 --- a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.android.kt +++ b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.android.kt @@ -20,9 +20,9 @@ actual class SharedHandlerPlatform : KoinComponent { `package` = "com.whatsapp" putExtra(Intent.EXTRA_TEXT, message) } - try { + runCatching { context.startActivity(intent) - } catch (e: Exception) { + }.onFailure { Toast.makeText(context, "WhatsApp não está instalado.", Toast.LENGTH_SHORT).show() } } @@ -33,9 +33,9 @@ actual class SharedHandlerPlatform : KoinComponent { data = Uri.parse("sms:") putExtra("sms_body", message) } - try { + runCatching { context.startActivity(intent) - } catch (e: Exception) { + }.onFailure { Toast.makeText(context, "Nenhum aplicativo de SMS encontrado.", Toast.LENGTH_SHORT).show() } } @@ -46,9 +46,9 @@ actual class SharedHandlerPlatform : KoinComponent { `package` = "com.instagram.android" putExtra(Intent.EXTRA_TEXT, url) } - try { + runCatching { context.startActivity(intent) - } catch (e: Exception) { + }.onFailure { Toast.makeText(context, "Instagram não está instalado.", Toast.LENGTH_SHORT).show() } } @@ -74,4 +74,4 @@ actual class SharedHandlerPlatform : KoinComponent { } } -actual fun getSharedHandlerPlatform(): SharedHandlerPlatform = SharedHandlerPlatform() \ No newline at end of file +actual fun getSharedHandlerPlatform(): SharedHandlerPlatform = SharedHandlerPlatform() diff --git a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamPlayerTopBarPreview.kt b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamPlayerTopBarPreview.kt index 0b5fd1f3..593f0b50 100644 --- a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamPlayerTopBarPreview.kt +++ b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamPlayerTopBarPreview.kt @@ -20,4 +20,4 @@ fun StreamPlayerTopBarPreview() { onSelectedProfilePicture = "" ) } -} \ No newline at end of file +} diff --git a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCardPreview.kt b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCardPreview.kt index ef626ff2..8d4841c8 100644 --- a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCardPreview.kt +++ b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCardPreview.kt @@ -13,4 +13,4 @@ fun StreamsCardPreview() { id = "", ) ) -} \ No newline at end of file +} diff --git a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCarouselPreview.kt b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCarouselPreview.kt index e05cd728..3146f326 100644 --- a/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCarouselPreview.kt +++ b/core-shared-ui/src/androidMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCarouselPreview.kt @@ -13,4 +13,4 @@ fun StreamsCarouselPreview() { contentList = emptyFlow() ) ) -} \ No newline at end of file +} diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/Sharing.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/Sharing.kt index 0a53109c..2f1886fe 100644 --- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/Sharing.kt +++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/Sharing.kt @@ -12,4 +12,4 @@ object Sharing { const val OPTIONS_TITLE_MESSAGE = "Compartilhar usando" const val ANIMATION_EXECUTION_DELAY = 100L const val ANIMATION_DURATION = 300 -} \ No newline at end of file +} diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.kt index f69166c8..fa31771b 100644 --- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.kt +++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.kt @@ -4,4 +4,4 @@ import androidx.compose.runtime.Composable @Composable -expect fun isPackageInstalled(packageName: String) : Boolean \ No newline at end of file +expect fun isPackageInstalled(packageName: String) : Boolean diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/IconWithText.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/IconWithText.kt index ce8e5c7d..b7573f89 100644 --- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/IconWithText.kt +++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/IconWithText.kt @@ -45,4 +45,4 @@ fun IconWithText( color = textColor ) } -} \ No newline at end of file +} diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/MicButton.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/MicButton.kt index 53b1f4ea..ae9f19e6 100644 --- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/MicButton.kt +++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/MicButton.kt @@ -16,4 +16,4 @@ fun MicButton(action: () -> Unit = {}) { onIconClickAction = action, iconColor = Color.Gray ) -} \ No newline at end of file +} diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SearchIcon.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SearchIcon.kt index c92c7987..bbc9161a 100644 --- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SearchIcon.kt +++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SearchIcon.kt @@ -16,4 +16,4 @@ fun SearchIcon(action: () -> Unit = {}) { onIconClickAction = action, iconColor = Color.Gray ) -} \ No newline at end of file +} diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.kt index bd1adfed..6854b3ac 100644 --- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.kt +++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.kt @@ -9,4 +9,4 @@ expect class SharedHandlerPlatform{ fun shareMoreOptions(title: String, url: String) } -expect fun getSharedHandlerPlatform() : SharedHandlerPlatform \ No newline at end of file +expect fun getSharedHandlerPlatform() : SharedHandlerPlatform diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharingStreamPlatform.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharingStreamPlatform.kt index 385f0df7..8244d152 100644 --- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharingStreamPlatform.kt +++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharingStreamPlatform.kt @@ -1,9 +1,20 @@ +@file:Suppress("LongMethod") package com.codandotv.streamplayerapp.core_shared_ui.widget import androidx.compose.foundation.clickable -import androidx.compose.foundation.layout.* -import androidx.compose.material3.* -import androidx.compose.runtime.* +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.material3.ExperimentalMaterial3Api +import androidx.compose.material3.ModalBottomSheet +import androidx.compose.material3.Text +import androidx.compose.material3.rememberModalBottomSheetState +import androidx.compose.runtime.Composable +import androidx.compose.runtime.LaunchedEffect +import androidx.compose.runtime.rememberCoroutineScope import androidx.compose.ui.Alignment import androidx.compose.ui.Modifier import androidx.compose.ui.graphics.Color diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamPlayerTopBar.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamPlayerTopBar.kt index 78b012be..9787c767 100644 --- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamPlayerTopBar.kt +++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamPlayerTopBar.kt @@ -141,4 +141,4 @@ private fun StreamPlayerOptionsTopBar(modifier: Modifier, scrollBehavior: TopApp } }, colors = TopAppBarDefaults.topAppBarColors(containerColor = Color.Transparent) ) -} \ No newline at end of file +} diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCard.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCard.kt index e52ef1b4..6d2a6f0e 100644 --- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCard.kt +++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/StreamsCard.kt @@ -44,4 +44,4 @@ data class StreamsCardContent( val id: String, val url: String, val contentDescription: String, -) \ No newline at end of file +) diff --git a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/WebImage.kt b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/WebImage.kt index 18282996..9a7134e9 100644 --- a/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/WebImage.kt +++ b/core-shared-ui/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/WebImage.kt @@ -16,6 +16,7 @@ import coil3.compose.SubcomposeAsyncImage import coil3.network.ktor3.KtorNetworkFetcherFactory import coil3.request.ImageRequest +@Suppress("LongParameterList") @Composable fun WebImage( imageUrl: String, @@ -55,4 +56,4 @@ fun WebImage( onFailure() } ) -} \ No newline at end of file +} diff --git a/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.ios.kt b/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.ios.kt index abf58cee..750907a2 100644 --- a/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.ios.kt +++ b/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/utils/SharingPlatform.ios.kt @@ -4,6 +4,5 @@ import androidx.compose.runtime.Composable @Composable actual fun isPackageInstalled(packageName: String): Boolean { - //TODO: return false -} \ No newline at end of file +} diff --git a/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.ios.kt b/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.ios.kt index 53978922..7abde7c4 100644 --- a/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.ios.kt +++ b/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/SharedHandlerPlatform.ios.kt @@ -53,4 +53,4 @@ actual class SharedHandlerPlatform { } } -actual fun getSharedHandlerPlatform(): SharedHandlerPlatform = SharedHandlerPlatform() \ No newline at end of file +actual fun getSharedHandlerPlatform(): SharedHandlerPlatform = SharedHandlerPlatform() diff --git a/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.ios.kt b/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.ios.kt index b77441c3..3d449ac3 100644 --- a/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.ios.kt +++ b/core-shared-ui/src/iosMain/kotlin/com/codandotv/streamplayerapp/core_shared_ui/widget/YoutubePlayerComponentPlatform.ios.kt @@ -36,4 +36,4 @@ actual fun YoutubePlayerComponentPlatform(videoId: String, modifier: Modifier){ }, update = { } ) -} \ No newline at end of file +} diff --git a/core-shared/build.gradle.kts b/core-shared/build.gradle.kts index 692b2f9a..89442f65 100644 --- a/core-shared/build.gradle.kts +++ b/core-shared/build.gradle.kts @@ -9,4 +9,4 @@ kotlin { implementation(libs.koin.core) } } -} \ No newline at end of file +} diff --git a/core-shared/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared/extension/String.Ext.kt b/core-shared/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared/extension/String.Ext.kt deleted file mode 100644 index ff5a8f5f..00000000 --- a/core-shared/src/commonMain/kotlin/com/codandotv/streamplayerapp/core_shared/extension/String.Ext.kt +++ /dev/null @@ -1,3 +0,0 @@ -package com.codandotv.streamplayerapp.core_shared.extension - -fun String.Companion.empty() = "" \ No newline at end of file diff --git a/feature-detail/build.gradle.kts b/feature-detail/build.gradle.kts index 5d810c56..01ec5a25 100644 --- a/feature-detail/build.gradle.kts +++ b/feature-detail/build.gradle.kts @@ -28,4 +28,4 @@ kotlin { implementation(libs.bundles.test.multiplatform) } } -} \ No newline at end of file +} diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/DetailStreamRepository.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/DetailStreamRepository.kt index 21adf8f1..8b6244da 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/DetailStreamRepository.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/DetailStreamRepository.kt @@ -51,4 +51,4 @@ class DetailStreamRepositoryImpl( .map { it.toVideoStreams() } -} \ No newline at end of file +} diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/model/DetailStreamResponse.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/model/DetailStreamResponse.kt index 27c79e86..18ef31d9 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/model/DetailStreamResponse.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/model/DetailStreamResponse.kt @@ -11,4 +11,4 @@ data class DetailStreamResponse( val tagline : String, val backdrop_path : String, val release_date : String -) \ No newline at end of file +) diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/model/VideoStreamResponse.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/model/VideoStreamResponse.kt index e7fcc7eb..6dd12400 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/model/VideoStreamResponse.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/data/model/VideoStreamResponse.kt @@ -17,4 +17,4 @@ data class VideoStreamResponse( data class VideoStreamsResponse( val id: Long, val results: List -) \ No newline at end of file +) diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/di/DetailStreamModule.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/di/DetailStreamModule.kt index 312f1cb6..bfe42650 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/di/DetailStreamModule.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/di/DetailStreamModule.kt @@ -1,6 +1,5 @@ package com.codandotv.streamplayerapp.feature_detail.di -import com.codandotv.streamplayerapp.core_shared_ui.widget.SharedHandlerPlatform import com.codandotv.streamplayerapp.core_shared_ui.widget.getSharedHandlerPlatform import com.codandotv.streamplayerapp.feature_detail.data.DetailStreamRepository import com.codandotv.streamplayerapp.feature_detail.data.DetailStreamRepositoryImpl @@ -60,4 +59,4 @@ object DetailStreamModule { factory { getSharedHandlerPlatform() } } -} \ No newline at end of file +} diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/DetailStream.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/DetailStream.kt index 0d9f6689..7d9e59f9 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/DetailStream.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/DetailStream.kt @@ -8,4 +8,4 @@ data class DetailStream( val url : String, val releaseYear : String, val isFavorite: Boolean -) \ No newline at end of file +) diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/DetailStreamUseCase.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/DetailStreamUseCase.kt index 74c3c256..e2b4ade9 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/DetailStreamUseCase.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/DetailStreamUseCase.kt @@ -23,4 +23,4 @@ class DetailStreamUseCaseImpl( detailStreamRepository.insertToMyList(movie) } } -} \ No newline at end of file +} diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/VideoStream.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/VideoStream.kt index 39ccb50e..1daa73f9 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/VideoStream.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/VideoStream.kt @@ -3,4 +3,4 @@ package com.codandotv.streamplayerapp.feature_detail.domain data class VideoStream( val movieId: Long, val videoId: String, -) \ No newline at end of file +) diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/VideoStreamsUseCase.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/VideoStreamsUseCase.kt index d35544be..06c9af38 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/VideoStreamsUseCase.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/domain/VideoStreamsUseCase.kt @@ -13,4 +13,4 @@ class VideoStreamsUseCaseImpl( override suspend fun getVideoStreams(): Flow> { return detailStreamRepository.getVideoStreams() } -} \ No newline at end of file +} diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/navigation/DetailStreamNavigation.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/navigation/DetailStreamNavigation.kt index f38c382c..27ca3eb4 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/navigation/DetailStreamNavigation.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/navigation/DetailStreamNavigation.kt @@ -3,7 +3,6 @@ package com.codandotv.streamplayerapp.feature_detail.presentation.navigation import androidx.navigation.NavGraphBuilder import androidx.navigation.NavHostController import androidx.navigation.compose.composable -import com.codandotv.streamplayerapp.core_navigation.routes.Routes import com.codandotv.streamplayerapp.core_navigation.routes.Routes.DETAIL_COMPLETE import com.codandotv.streamplayerapp.core_navigation.routes.Routes.PARAM.ID import com.codandotv.streamplayerapp.feature_detail.di.DetailStreamModule @@ -28,9 +27,6 @@ fun NavGraphBuilder.detailStreamNavGraph(navController: NavHostController) { }, navController = navController, sharedHandlerPlatform = getKoin().get(), - onNavigateSearchScreen = { - navController.navigate(Routes.SEARCH) - }, ) } } diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/screens/DetailStreamViewModel.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/screens/DetailStreamViewModel.kt index a9ae55f1..cac14ad2 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/screens/DetailStreamViewModel.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/screens/DetailStreamViewModel.kt @@ -68,4 +68,4 @@ class DetailStreamViewModel( detailStreamUseCase.toggleItemInFavorites(detailStream) } } -} \ No newline at end of file +} diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/screens/DetailStreamsScreen.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/screens/DetailStreamsScreen.kt index 45164d51..e92cd470 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/screens/DetailStreamsScreen.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/screens/DetailStreamsScreen.kt @@ -49,7 +49,6 @@ fun DetailStreamScreen( viewModel: DetailStreamViewModel = koinViewModel(), navController: NavController, sharedHandlerPlatform: SharedHandlerPlatform, - onNavigateSearchScreen: () -> Unit = {}, ) { val uiState by viewModel.uiState.collectAsState() @@ -59,7 +58,6 @@ fun DetailStreamScreen( onToggleToMyList = { detailStream -> viewModel.toggleItemInFavorites(detailStream) }, uiState = uiState as DetailStreamsUIState.DetailStreamsLoadedUIState, navController = navController, - onNavigateSearchScreen = onNavigateSearchScreen, sharedHandlerPlatform = sharedHandlerPlatform ) } @@ -83,8 +81,7 @@ private fun SetupDetailScreen( onToggleToMyList: (DetailStream) -> Unit, uiState: DetailStreamsUIState.DetailStreamsLoadedUIState, navController: NavController, - sharedHandlerPlatform : SharedHandlerPlatform, - onNavigateSearchScreen: () -> Unit = {}, + sharedHandlerPlatform: SharedHandlerPlatform, ) { val showDialog = remember { mutableStateOf(false) } @@ -177,4 +174,4 @@ private fun SetupDetailScreen( }) } }) -} \ No newline at end of file +} diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamActionOption.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamActionOption.kt index 03b52f98..1b6b8623 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamActionOption.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamActionOption.kt @@ -77,4 +77,4 @@ fun DetailStreamActionOption( textColor = Color.Gray, ) } -} \ No newline at end of file +} diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamButtonAction.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamButtonAction.kt index c97b9f1e..d2cd3161 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamButtonAction.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamButtonAction.kt @@ -56,4 +56,4 @@ fun DetailStreamButtonAction( ) } } -} \ No newline at end of file +} diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamImagePreview.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamImagePreview.kt index 43fb45be..121c3f8e 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamImagePreview.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamImagePreview.kt @@ -73,4 +73,4 @@ fun DetailStreamImagePreview( ) } } -} \ No newline at end of file +} diff --git a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamRowHeader.kt b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamRowHeader.kt index cf5d5c0f..96e7b07d 100644 --- a/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamRowHeader.kt +++ b/feature-detail/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_detail/presentation/widget/DetailStreamRowHeader.kt @@ -48,4 +48,4 @@ fun DetailStreamRowHeader( ) ) } -} \ No newline at end of file +} diff --git a/feature-detail/src/commonTest/kotlin/feature_detail/Shared.kt b/feature-detail/src/commonTest/kotlin/feature_detail/Shared.kt index f508518a..f8be4c4d 100644 --- a/feature-detail/src/commonTest/kotlin/feature_detail/Shared.kt +++ b/feature-detail/src/commonTest/kotlin/feature_detail/Shared.kt @@ -31,4 +31,4 @@ val expectedDetailStream = DetailStreamResponse( val expectedDetailStreamLoadedUI = DetailStreamsUIState.DetailStreamsLoadedUIState( detailStream = fakeStream, videoId = "123" -) \ No newline at end of file +) diff --git a/feature-list-streams/build.gradle.kts b/feature-list-streams/build.gradle.kts index 71c94bd1..d12b7e74 100644 --- a/feature-list-streams/build.gradle.kts +++ b/feature-list-streams/build.gradle.kts @@ -25,4 +25,4 @@ kotlin { implementation(libs.koin.compose.viewmodel) } } -} \ No newline at end of file +} diff --git a/feature-list-streams/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/widgets/HighlightBannerPreview.kt b/feature-list-streams/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/widgets/HighlightBannerPreview.kt index b5e899a9..deae77b4 100644 --- a/feature-list-streams/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/widgets/HighlightBannerPreview.kt +++ b/feature-list-streams/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/widgets/HighlightBannerPreview.kt @@ -14,6 +14,7 @@ import streamplayerapp_kmp.feature_list_streams.generated.resources.list_highlig import streamplayerapp_kmp.feature_list_streams.generated.resources.list_highlight_banner_info import streamplayerapp_kmp.feature_list_streams.generated.resources.list_highlight_banner_watch +typealias ContentType = com.codandotv.streamplayerapp.feature_list_streams.core.ContentType @ThemePreviews @Composable fun HighlightBannerPreview() { @@ -21,16 +22,16 @@ fun HighlightBannerPreview() { data = com.codandotv.streamplayerapp.feature_list_streams.list.domain.model.HighlightBanner( name = stringResource(Res.string.app_name), imageUrl = String(), - contentType = com.codandotv.streamplayerapp.feature_list_streams.core.ContentType.getContentName( - com.codandotv.streamplayerapp.feature_list_streams.core.ContentType.SHOW + contentType = ContentType.getContentName( + ContentType.SHOW ), - contentTypeAsPlural = com.codandotv.streamplayerapp.feature_list_streams.core.ContentType.getContentNameAsPlural( - com.codandotv.streamplayerapp.feature_list_streams.core.ContentType.SHOW + contentTypeAsPlural = ContentType.getContentNameAsPlural( + ContentType.SHOW ), extraInfo = IconAndTextInfo( streamplayerapp_kmp.feature_list_streams.generated.resources.Res.drawable.ic_top_10, - com.codandotv.streamplayerapp.feature_list_streams.core.ContentType.getContentName( - com.codandotv.streamplayerapp.feature_list_streams.core.ContentType.SHOW + ContentType.getContentName( + ContentType.SHOW ) ), leftButton = IconAndTextInfo( diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/core/ContentType.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/core/ContentType.kt index 38c98665..576308ba 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/core/ContentType.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/core/ContentType.kt @@ -18,4 +18,4 @@ enum class ContentType(val contentName: StringResource, val contentNameAsPlural: fun getContentNameAsPlural(contentType: ContentType) = entries.first { contentType == it }.contentNameAsPlural } -} \ No newline at end of file +} diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/ListStreamRepository.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/ListStreamRepository.kt index dce60971..04030707 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/ListStreamRepository.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/ListStreamRepository.kt @@ -48,4 +48,4 @@ class ListStreamRepositoryImpl( private const val PAGE_SIZE = 20 private const val MAX_SIZE = 500 } -} \ No newline at end of file +} diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/StreamDataSource.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/StreamDataSource.kt index feec9ad6..cf89dd96 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/StreamDataSource.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/StreamDataSource.kt @@ -41,4 +41,4 @@ class StreamDataSource( companion object { private const val START_PAGE_INDEX = 1 } -} \ No newline at end of file +} diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/model/GenresResponse.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/model/GenresResponse.kt index 3533dcdd..4ad38d13 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/model/GenresResponse.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/data/model/GenresResponse.kt @@ -11,4 +11,4 @@ data class GenreResponse( @Serializable data class GenresResponse( val genres: List -) \ No newline at end of file +) diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/di/ListStreamModule.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/di/ListStreamModule.kt index ffbfb75e..02a1cf6d 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/di/ListStreamModule.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/di/ListStreamModule.kt @@ -60,4 +60,4 @@ object ListStreamModule { ) } } -} \ No newline at end of file +} diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/GetGenresUseCase.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/GetGenresUseCase.kt index e3da0b8c..c798d16f 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/GetGenresUseCase.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/GetGenresUseCase.kt @@ -14,4 +14,4 @@ class GetGenresUseCaseImpl( override suspend fun invoke(): Flow> { return repository.getGenres() } -} \ No newline at end of file +} diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/GetLatestMovieUseCase.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/GetLatestMovieUseCase.kt index a5300816..921d6ac6 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/GetLatestMovieUseCase.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/GetLatestMovieUseCase.kt @@ -14,4 +14,4 @@ class GetTopRatedStreamImpl( override suspend operator fun invoke(): Flow { return repository.topRatedStream() } -} \ No newline at end of file +} diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListMovieUseCase.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListMovieUseCase.kt index b4aff62b..a2705721 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListMovieUseCase.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListMovieUseCase.kt @@ -16,4 +16,4 @@ class ListStreamUseCaseImpl( override operator fun invoke(genre: Genre): Flow> { return repository.loadMovies(genre) } -} \ No newline at end of file +} diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListStreamAnalytics.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListStreamAnalytics.kt index e2fc2866..fba556a0 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListStreamAnalytics.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListStreamAnalytics.kt @@ -3,4 +3,4 @@ package com.codandotv.streamplayerapp.feature_list_streams.list.domain interface ListStreamAnalytics -class ListStreamAnalyticsImpl : ListStreamAnalytics \ No newline at end of file +class ListStreamAnalyticsImpl : ListStreamAnalytics diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListStreamMapper.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListStreamMapper.kt index 105d61a4..7cab23fe 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListStreamMapper.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/ListStreamMapper.kt @@ -25,4 +25,4 @@ fun StreamResponse.toStream(): Stream = Stream( name = title, posterPathUrl = "${Url.IMAGE_URL_SIZE_300}${poster_path}", id = id.toString() -) \ No newline at end of file +) diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/model/HighlightBanner.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/model/HighlightBanner.kt index 75c93595..20786df5 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/model/HighlightBanner.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/model/HighlightBanner.kt @@ -17,4 +17,4 @@ data class HighlightBanner( data class IconAndTextInfo( val icon: DrawableResource, val text: StringResource -) \ No newline at end of file +) diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/model/ListStream.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/model/ListStream.kt index efebe7e1..c79aa627 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/model/ListStream.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/domain/model/ListStream.kt @@ -9,4 +9,4 @@ data class Stream( data class ListStream( val categoryName: String, val streams: List -) \ No newline at end of file +) diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/screens/ListStreamViewModel.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/screens/ListStreamViewModel.kt index 0c6ad07f..0a38de37 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/screens/ListStreamViewModel.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/screens/ListStreamViewModel.kt @@ -133,4 +133,4 @@ class ListStreamViewModel( it.copy(isLoading = true) } } -} \ No newline at end of file +} diff --git a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/screens/ListStreamsUIState.kt b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/screens/ListStreamsUIState.kt index 5260d36c..3e444dfa 100644 --- a/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/screens/ListStreamsUIState.kt +++ b/feature-list-streams/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_list_streams/list/presentation/screens/ListStreamsUIState.kt @@ -7,4 +7,4 @@ data class ListStreamsUIState( val highlightBanner: HighlightBanner? = null, val streamsCarouselContent: List, val isLoading: Boolean -) \ No newline at end of file +) diff --git a/feature-news/build.gradle.kts b/feature-news/build.gradle.kts index d0b31cc9..a3f9747e 100644 --- a/feature-news/build.gradle.kts +++ b/feature-news/build.gradle.kts @@ -27,4 +27,4 @@ kotlin { implementation(libs.bundles.test) } } -} \ No newline at end of file +} diff --git a/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/di/NewsScreenModule.kt b/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/di/NewsScreenModule.kt index 6580e92a..bbc52bfe 100644 --- a/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/di/NewsScreenModule.kt +++ b/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/di/NewsScreenModule.kt @@ -10,4 +10,4 @@ object NewsScreenModule { NewsScreenViewModel( permissionsManager = get()) } } -} \ No newline at end of file +} diff --git a/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/presentation/navigation/NewsNavigation.kt b/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/presentation/navigation/NewsNavigation.kt index fd8e6717..7641657b 100644 --- a/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/presentation/navigation/NewsNavigation.kt +++ b/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/presentation/navigation/NewsNavigation.kt @@ -19,4 +19,4 @@ fun NavGraphBuilder.newsStreamNavGraph(navController: NavHostController) { } NewsScreenContent(navController) } -} \ No newline at end of file +} diff --git a/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/presentation/widget/ImagePickerCameraGallery.kt b/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/presentation/widget/ImagePickerCameraGallery.kt index 92e1e195..c975b994 100644 --- a/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/presentation/widget/ImagePickerCameraGallery.kt +++ b/feature-news/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_news/presentation/widget/ImagePickerCameraGallery.kt @@ -2,7 +2,17 @@ package com.codandotv.streamplayerapp.feature_news.presentation.widget import androidx.compose.foundation.Image import androidx.compose.foundation.background -import androidx.compose.foundation.layout.* +import androidx.compose.foundation.layout.Arrangement +import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.Column +import androidx.compose.foundation.layout.Row +import androidx.compose.foundation.layout.Spacer +import androidx.compose.foundation.layout.aspectRatio +import androidx.compose.foundation.layout.fillMaxSize +import androidx.compose.foundation.layout.fillMaxWidth +import androidx.compose.foundation.layout.height +import androidx.compose.foundation.layout.padding +import androidx.compose.foundation.layout.size import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Share import androidx.compose.material3.Button @@ -66,4 +76,4 @@ fun ImagePickerContent( } } } -} \ No newline at end of file +} diff --git a/feature-profile/build.gradle.kts b/feature-profile/build.gradle.kts index 42116ffe..59bc51e2 100644 --- a/feature-profile/build.gradle.kts +++ b/feature-profile/build.gradle.kts @@ -24,4 +24,4 @@ kotlin { implementation(libs.koin.compose.viewmodel) } } -} \ No newline at end of file +} diff --git a/feature-profile/src/androidMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/ProfilePickerStreamToolbarPreview.kt b/feature-profile/src/androidMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/ProfilePickerStreamToolbarPreview.kt index f26eac1c..eca69bc3 100644 --- a/feature-profile/src/androidMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/ProfilePickerStreamToolbarPreview.kt +++ b/feature-profile/src/androidMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/ProfilePickerStreamToolbarPreview.kt @@ -11,4 +11,4 @@ fun ProfilePickerStreamToolbarPreview() { MaterialTheme { ProfilePickerStreamToolbar() } -} \ No newline at end of file +} diff --git a/feature-profile/src/androidMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/SetupProfilePickerScreenPreview.kt b/feature-profile/src/androidMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/SetupProfilePickerScreenPreview.kt index 363bd326..d985a6bc 100644 --- a/feature-profile/src/androidMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/SetupProfilePickerScreenPreview.kt +++ b/feature-profile/src/androidMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/SetupProfilePickerScreenPreview.kt @@ -15,4 +15,4 @@ fun SetupProfilePickerScreenPreview() { ) ) } -} \ No newline at end of file +} diff --git a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/data/model/ProfileStreamResponse.kt b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/data/model/ProfileStreamResponse.kt index afac8e93..8c61aa6a 100644 --- a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/data/model/ProfileStreamResponse.kt +++ b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/data/model/ProfileStreamResponse.kt @@ -13,4 +13,4 @@ data class ProfileStreamResponse( @Serializable data class ProfilesResponse( val profiles: List -) \ No newline at end of file +) diff --git a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/di/ProfilePickerStreamModule.kt b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/di/ProfilePickerStreamModule.kt index 127e6887..76e222d8 100644 --- a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/di/ProfilePickerStreamModule.kt +++ b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/di/ProfilePickerStreamModule.kt @@ -36,4 +36,4 @@ object ProfilePickerStreamModule { ) } } -} \ No newline at end of file +} diff --git a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/domain/ProfileStream.kt b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/domain/ProfileStream.kt index 5440084a..3eaa2cb8 100644 --- a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/domain/ProfileStream.kt +++ b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/domain/ProfileStream.kt @@ -4,4 +4,4 @@ data class ProfileStream( val id: String, val name: String, val imageUrl: String -) \ No newline at end of file +) diff --git a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/ProfilePickerStreamScreen.kt b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/ProfilePickerStreamScreen.kt index 5dfa8488..31162930 100644 --- a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/ProfilePickerStreamScreen.kt +++ b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/screens/ProfilePickerStreamScreen.kt @@ -144,4 +144,4 @@ fun SetupProfilePickerScreen( } } ) -} \ No newline at end of file +} diff --git a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ComposeExtensions.kt b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ComposeExtensions.kt index 109a6561..64e6de7c 100644 --- a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ComposeExtensions.kt +++ b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ComposeExtensions.kt @@ -5,4 +5,4 @@ import androidx.compose.ui.platform.LocalDensity import androidx.compose.ui.unit.Dp @Composable -fun Dp.dpToPx(): Int = with(LocalDensity.current) { this@dpToPx.roundToPx() } \ No newline at end of file +fun Dp.dpToPx(): Int = with(LocalDensity.current) { this@dpToPx.roundToPx() } diff --git a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ProfilePickerProfilesGrid.kt b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ProfilePickerProfilesGrid.kt index d207b644..6b99fe34 100644 --- a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ProfilePickerProfilesGrid.kt +++ b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ProfilePickerProfilesGrid.kt @@ -121,4 +121,4 @@ private fun ProfileItem( Spacer(modifier = Modifier.height(28.dp)) } } -} \ No newline at end of file +} diff --git a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ProfilePickerSelectedProfileContainer.kt b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ProfilePickerSelectedProfileContainer.kt index 8d87fc18..b54ed2e8 100644 --- a/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ProfilePickerSelectedProfileContainer.kt +++ b/feature-profile/src/commonMain/kotlin/com/codandotv/streamplayerapp/profile/presentation/widget/ProfilePickerSelectedProfileContainer.kt @@ -59,4 +59,4 @@ fun ProfilePickerSelectedProfileContainer( } } } -} \ No newline at end of file +} diff --git a/feature-search/build.gradle.kts b/feature-search/build.gradle.kts index 91d24b35..05d5b8e0 100644 --- a/feature-search/build.gradle.kts +++ b/feature-search/build.gradle.kts @@ -28,4 +28,4 @@ kotlin { implementation(libs.koin.compose.viewmodel) } } -} \ No newline at end of file +} diff --git a/feature-search/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/widgets/SearchStreamCardPreview.kt b/feature-search/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/widgets/SearchStreamCardPreview.kt index 2597746e..460ae0fb 100644 --- a/feature-search/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/widgets/SearchStreamCardPreview.kt +++ b/feature-search/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/widgets/SearchStreamCardPreview.kt @@ -22,4 +22,4 @@ fun SearchStreamCardPreview() { @Composable fun PlayerPreview() { PlayerIcon(modifier = Modifier) -} \ No newline at end of file +} diff --git a/feature-search/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/widgets/StreamsCarouselPreview.kt b/feature-search/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/widgets/StreamsCarouselPreview.kt index 75b34df3..9a3c0a2a 100644 --- a/feature-search/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/widgets/StreamsCarouselPreview.kt +++ b/feature-search/src/androidMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/widgets/StreamsCarouselPreview.kt @@ -16,4 +16,4 @@ fun StreamsErrorPreview() { @Preview fun StreamEmptyPreview() { StreamsEmpty() -} \ No newline at end of file +} diff --git a/feature-search/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/screens/SearchScreen.kt b/feature-search/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/screens/SearchScreen.kt index 379193e8..c3067ecb 100644 --- a/feature-search/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/screens/SearchScreen.kt +++ b/feature-search/src/commonMain/kotlin/com/codandotv/streamplayerapp/feature_search/presentation/screens/SearchScreen.kt @@ -137,4 +137,4 @@ private fun SetupSearchScreen( } } } -} \ No newline at end of file +} diff --git a/scripts/linter/run_detekt.sh b/scripts/linter/run_detekt.sh new file mode 100644 index 00000000..9298f4d9 --- /dev/null +++ b/scripts/linter/run_detekt.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# Default configuration path +DETEKT_CONFIG="../../config/detekt/detekt.yml" +DETEKT_CLI="detekt" + +# Check if detekt is installed +if ! command -v $DETEKT_CLI &> /dev/null +then + echo "Detekt CLI could not be found. Please run 'scripts/linter/install-detekt.sh' first." + exit 1 +fi + +# Run Detekt +# --config: path to config file +# --input: path(s) to scan +# --report: where to save output (xml, html, txt) +detekt -i ../../ -c "../../config/detekt/detekt.yml" -ex "**/build/**" \ No newline at end of file