Skip to content

Commit

Permalink
Fix detekt issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nasrabadiAM committed Jul 13, 2024
1 parent fa890e4 commit 6f131db
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 11 deletions.
3 changes: 0 additions & 3 deletions app/src/main/java/me/nasrabadiam/tictactoe/home/HomeScreen.kt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package me.nasrabadiam.tictactoe.home

import androidx.compose.foundation.Image
import androidx.compose.foundation.background
import androidx.compose.foundation.clickable
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
Expand Down Expand Up @@ -36,8 +35,6 @@ import androidx.compose.ui.tooling.preview.PreviewParameter
import androidx.compose.ui.unit.dp
import me.nasrabadiam.tictactoe.R
import me.nasrabadiam.tictactoe.home.HomeEvent.PlayWithAFriend
import me.nasrabadiam.resources.LocaleManager
import me.nasrabadiam.resources.Locales
import me.nasrabadiam.tictactoe.strings.appStrings
import me.nasrabadiam.tictactoe.strings.getAppStrings
import me.nasrabadiam.tictactoe.ui.GameWindowSizeClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ internal val AppStrings: Map<LanguageTag, Strings> = mapOf(
)

internal val AppStringsLayoutDirections: Map<LanguageTag, LayoutDirection> = mapOf(
Locales.EN.getName() to LayoutDirection.Ltr,
Locales.FA.getName() to LayoutDirection.Rtl,
Locales.EN.getName() to LayoutDirection.LTR,
Locales.FA.getName() to LayoutDirection.RTL,
)

internal val LocalStrings: ProvidableCompositionLocal<Strings> =
Expand Down
2 changes: 1 addition & 1 deletion library/resources/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ java {
targetCompatibility = JavaVersion.VERSION_17
}

dependencies{
dependencies {
implementation(libs.coroutines)
implementation(platform(libs.compose.bom))
implementation(libs.ui)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,7 @@ public fun getLocale(): Locale {
}

public enum class Locales {
EN,
FA;
EN, FA
}

public fun Locales.getName(): String {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,5 @@ public class LyricistException internal constructor(
) : RuntimeException()

public enum class LayoutDirection {
Ltr, Rtl
LTR, RTL
}
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public fun <T> ProvideStrings(

private fun LayoutDirection.toComposeLayoutDirection(): ComposeLayoutDirection {
return when (this) {
LayoutDirection.Ltr -> ComposeLayoutDirection.Ltr
LayoutDirection.Rtl -> ComposeLayoutDirection.Rtl
LayoutDirection.LTR -> ComposeLayoutDirection.Ltr
LayoutDirection.RTL -> ComposeLayoutDirection.Rtl
}
}

0 comments on commit 6f131db

Please sign in to comment.