Replace Skip implementation with Kotlin Multiplatform implementation

This commit is contained in:
2026-09-02 22:11:32 +03:00
parent 902b683779
commit abf7cf2e83
184 changed files with 7163 additions and 2449 deletions
@@ -0,0 +1,7 @@
package xyz.tyiu.satsprice
class JVMPlatform : Platform {
override val name: String = "Java ${System.getProperty("java.version")}"
}
actual fun getPlatform(): Platform = JVMPlatform()
@@ -0,0 +1,21 @@
package xyz.tyiu.satsprice
import java.util.Currency
import java.util.Locale
actual fun systemCurrencies(): List<CurrencyInfo> =
Currency.getAvailableCurrencies()
.map { CurrencyInfo(it.currencyCode, it.getDisplayName(Locale.getDefault())) }
.sortedBy { it.code }
actual fun localeCurrencyCode(): String? = try {
Currency.getInstance(Locale.getDefault())?.currencyCode
} catch (e: IllegalArgumentException) {
null
}
actual fun currencyDecimalDigits(code: String): Int = try {
Currency.getInstance(code).defaultFractionDigits.takeIf { it >= 0 } ?: 2
} catch (e: IllegalArgumentException) {
2
}
@@ -0,0 +1,6 @@
package xyz.tyiu.satsprice.ui
import androidx.compose.ui.unit.Dp
import androidx.compose.ui.unit.dp
actual val screenHorizontalPadding: Dp = 24.dp