diff --git a/build-logic/settings.gradle.kts b/build-logic/settings.gradle.kts index b92e00da..9effadbc 100644 --- a/build-logic/settings.gradle.kts +++ b/build-logic/settings.gradle.kts @@ -16,6 +16,7 @@ * along with this program. If not, see . */ +@Suppress("UnstableApiUsage") dependencyResolutionManagement { repositories { google() diff --git a/core/base/src/main/java/com/sadellie/unitto/core/base/TopLevelDestinations.kt b/core/base/src/main/java/com/sadellie/unitto/core/base/TopLevelDestinations.kt index 5d4bff94..fe6b3bb8 100644 --- a/core/base/src/main/java/com/sadellie/unitto/core/base/TopLevelDestinations.kt +++ b/core/base/src/main/java/com/sadellie/unitto/core/base/TopLevelDestinations.kt @@ -34,10 +34,10 @@ sealed class TopLevelDestinations( name = R.string.calculator ) - object Epoch : TopLevelDestinations( - route = "epoch_route", - name = R.string.epoch_converter - ) +// object Epoch : TopLevelDestinations( +// route = "epoch_route", +// name = R.string.epoch_converter +// ) object Settings : TopLevelDestinations( route = "settings_graph", diff --git a/core/base/src/main/res/mipmap-anydpi-v26/ic_launcher_icon_round.xml b/core/base/src/main/res/mipmap-anydpi-v26/ic_launcher_icon_round.xml deleted file mode 100644 index cfabe93f..00000000 --- a/core/base/src/main/res/mipmap-anydpi-v26/ic_launcher_icon_round.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/core/base/src/main/res/mipmap-hdpi/ic_launcher_icon_round.png b/core/base/src/main/res/mipmap-hdpi/ic_launcher_icon_round.png deleted file mode 100644 index 58645901..00000000 Binary files a/core/base/src/main/res/mipmap-hdpi/ic_launcher_icon_round.png and /dev/null differ diff --git a/core/base/src/main/res/mipmap-mdpi/ic_launcher_icon_round.png b/core/base/src/main/res/mipmap-mdpi/ic_launcher_icon_round.png deleted file mode 100644 index 092f58e2..00000000 Binary files a/core/base/src/main/res/mipmap-mdpi/ic_launcher_icon_round.png and /dev/null differ diff --git a/core/base/src/main/res/mipmap-xhdpi/ic_launcher_icon_round.png b/core/base/src/main/res/mipmap-xhdpi/ic_launcher_icon_round.png deleted file mode 100644 index ea63bc68..00000000 Binary files a/core/base/src/main/res/mipmap-xhdpi/ic_launcher_icon_round.png and /dev/null differ diff --git a/core/base/src/main/res/mipmap-xxhdpi/ic_launcher_icon_round.png b/core/base/src/main/res/mipmap-xxhdpi/ic_launcher_icon_round.png deleted file mode 100644 index 2d86de89..00000000 Binary files a/core/base/src/main/res/mipmap-xxhdpi/ic_launcher_icon_round.png and /dev/null differ diff --git a/core/base/src/main/res/mipmap-xxxhdpi/ic_launcher_icon_round.png b/core/base/src/main/res/mipmap-xxxhdpi/ic_launcher_icon_round.png deleted file mode 100644 index 16dc1a5e..00000000 Binary files a/core/base/src/main/res/mipmap-xxxhdpi/ic_launcher_icon_round.png and /dev/null differ diff --git a/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/textfield/FormatterSymbols.kt b/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/textfield/FormatterSymbols.kt index e8509dad..fc5b6615 100644 --- a/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/textfield/FormatterSymbols.kt +++ b/core/ui/src/main/java/com/sadellie/unitto/core/ui/common/textfield/FormatterSymbols.kt @@ -27,7 +27,7 @@ sealed class FormatterSymbols(val grouping: String, val fractional: String) { } object AllFormatterSymbols { - private val allFormatterSymbs by lazy { + private val allFormatterSymbols by lazy { hashMapOf( Separator.SPACES to FormatterSymbols.Spaces, Separator.PERIOD to FormatterSymbols.Period, @@ -41,6 +41,6 @@ object AllFormatterSymbols { * @see Separator */ fun getById(separator: Int): FormatterSymbols { - return allFormatterSymbs.getOrElse(separator) { FormatterSymbols.Spaces } + return allFormatterSymbols.getOrElse(separator) { FormatterSymbols.Spaces } } } diff --git a/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/TopScreen.kt b/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/TopScreen.kt index 3fdf502c..f73a2bd5 100644 --- a/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/TopScreen.kt +++ b/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/TopScreen.kt @@ -30,7 +30,7 @@ import androidx.compose.animation.expandVertically import androidx.compose.animation.fadeIn import androidx.compose.animation.fadeOut import androidx.compose.animation.shrinkVertically -import androidx.compose.animation.with +import androidx.compose.animation.togetherWith import androidx.compose.foundation.layout.Row import androidx.compose.foundation.layout.Spacer import androidx.compose.foundation.layout.fillMaxWidth @@ -147,7 +147,9 @@ internal fun TopScreenPart( ExpressionTextField( modifier = Modifier, value = calculatedTextFieldValue, - onCursorChange = { calculatedTextFieldValue = calculatedTextFieldValue.copy(selection = it) }, + onCursorChange = { newSelection -> + calculatedTextFieldValue = calculatedTextFieldValue.copy(selection = newSelection) + }, formatterSymbols = formatterSymbols, textColor = MaterialTheme.colorScheme.onSurfaceVariant.copy(alpha = 0.6f), minRatio = 0.7f @@ -159,8 +161,7 @@ internal fun TopScreenPart( transitionSpec = { // Enter animation (expandHorizontally(clip = false, expandFrom = Alignment.Start) + fadeIn() - // Exit animation - with fadeOut()) + togetherWith fadeOut()) .using(SizeTransform(clip = false)) } ) { value -> @@ -178,7 +179,9 @@ internal fun TopScreenPart( ExpressionTextField( modifier = Modifier.weight(2f), value = outputTextFieldValue, - onCursorChange = { outputTextFieldValue = outputTextFieldValue.copy(selection = it) }, + onCursorChange = { newSelection -> + outputTextFieldValue = outputTextFieldValue.copy(selection = newSelection) + }, formatterSymbols = formatterSymbols, readOnly = true, minRatio = 0.7f @@ -197,7 +200,9 @@ internal fun TopScreenPart( UnformattedTextField( modifier = Modifier.weight(2f), value = outputTextFieldValue, - onCursorChange = { outputTextFieldValue = outputTextFieldValue.copy(selection = it) }, + onCursorChange = { newSelection -> + outputTextFieldValue = outputTextFieldValue.copy(selection = newSelection) + }, minRatio = 0.7f, readOnly = true ) @@ -210,7 +215,9 @@ internal fun TopScreenPart( UnformattedTextField( modifier = Modifier.weight(2f), value = outputTextFieldValue, - onCursorChange = { outputTextFieldValue = outputTextFieldValue.copy(selection = it) }, + onCursorChange = { newSelection -> + outputTextFieldValue = outputTextFieldValue.copy(selection = newSelection) + }, minRatio = 0.7f, readOnly = true ) @@ -245,7 +252,7 @@ internal fun TopScreenPart( // Enter animation (expandHorizontally(clip = false, expandFrom = Alignment.Start) + fadeIn() // Exit animation - with fadeOut()) + togetherWith fadeOut()) .using(SizeTransform(clip = false)) } ) { value -> diff --git a/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/UnitSelectionButton.kt b/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/UnitSelectionButton.kt index 799eacfb..65a03503 100644 --- a/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/UnitSelectionButton.kt +++ b/feature/converter/src/main/java/com/sadellie/unitto/feature/converter/components/UnitSelectionButton.kt @@ -82,11 +82,11 @@ internal fun UnitSelectionButton( targetState = label ?: 0, transitionSpec = { if (targetState > initialState) { - (slideInVertically { height -> height } + fadeIn()).togetherWith( - slideOutVertically { height -> -height } + fadeOut()) + (slideInVertically { height -> height } + fadeIn()) togetherWith + slideOutVertically { height -> -height } + fadeOut() } else { - (slideInVertically { height -> -height } + fadeIn()).togetherWith( - slideOutVertically { height -> height } + fadeOut()) + (slideInVertically { height -> -height } + fadeIn()) togetherWith + slideOutVertically { height -> height } + fadeOut() }.using( SizeTransform(clip = false) ) diff --git a/settings.gradle.kts b/settings.gradle.kts index 7e9e80f9..4f3cc9f0 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -7,6 +7,7 @@ pluginManagement { } } +@Suppress("UnstableApiUsage") dependencyResolutionManagement { repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS) repositories {