File tree Expand file tree Collapse file tree
src/iosMain/kotlin/dev/icerock/moko/errors/presenters Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -15,11 +15,17 @@ group = "dev.icerock.moko"
1515version = Deps .mokoErrorsVersion
1616
1717dependencies {
18+ commonMainImplementation(Deps .Libs .MultiPlatform .coroutines)
19+
1820 androidMainImplementation(Deps .Libs .Android .appCompat)
1921 androidMainImplementation(Deps .Libs .Android .material)
2022
2123 commonMainImplementation(Deps .Libs .MultiPlatform .mokoMvvm)
2224 commonMainImplementation(Deps .Libs .MultiPlatform .mokoResources)
25+
26+ // temporary fix of https://youtrack.jetbrains.com/issue/KT-41083
27+ commonMainImplementation(" dev.icerock.moko:parcelize:0.4.0" )
28+ commonMainImplementation(" dev.icerock.moko:graphics:0.4.0" )
2329}
2430
2531multiplatformResources {
Original file line number Diff line number Diff line change 55package dev.icerock.moko.errors.presenters
66
77import dev.icerock.moko.resources.desc.StringDesc
8+ import dev.icerock.moko.resources.desc.desc
9+ import dev.icerock.moko.errors.MR
810
911/* *
1012 * In iOS there is no such thing as snackbar, so it shows [AlertErrorPresenter].
1113 */
1214actual class SnackBarErrorPresenter actual constructor(
13- private val duration : SnackBarDuration
14- ) : ErrorPresenter<StringDesc> by AlertErrorPresenter()
15+ duration : SnackBarDuration
16+ ) : ErrorPresenter<StringDesc> by AlertErrorPresenter(
17+ alertTitle = MR .strings.moko_errors_presenters_alertDialogTitle.desc(),
18+ positiveButtonText = MR .strings.moko_errors_presenters_alertPositiveButton.desc()
19+ )
Original file line number Diff line number Diff line change 44
55package dev.icerock.moko.errors.presenters
66
7+ import dev.icerock.moko.errors.MR
78import dev.icerock.moko.resources.desc.StringDesc
9+ import dev.icerock.moko.resources.desc.desc
810
911/* *
1012 * In iOS there is no such thing as toast, so it shows [AlertErrorPresenter].
1113 */
1214actual class ToastErrorPresenter actual constructor(
13- private val duration : ToastDuration
14- ) : ErrorPresenter<StringDesc> by AlertErrorPresenter()
15+ duration : ToastDuration
16+ ) : ErrorPresenter<StringDesc> by AlertErrorPresenter(
17+ alertTitle = MR .strings.moko_errors_presenters_alertDialogTitle.desc(),
18+ positiveButtonText = MR .strings.moko_errors_presenters_alertPositiveButton.desc()
19+ )
Original file line number Diff line number Diff line change @@ -3,6 +3,9 @@ org.gradle.configureondemand=false
33org.gradle.parallel =true
44
55kotlin.code.style =official
6+ kotlin.native.enableDependencyPropagation =false
7+ kotlin.mpp.enableGranularSourceSetsMetadata =true
8+ kotlin.mpp.enableCompatibilityMetadataVariant =true
69
710android.useAndroidX =true
811
You can’t perform that action at this time.
0 commit comments