@momo-kits/native-kits 0.160.1-scrolltotop.21-debug → 0.160.1-scrolltotop.22-debug
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/compose/build.gradle.kts +1 -1
- package/compose/compose.podspec +1 -1
- package/compose/src/commonMain/kotlin/vn/momo/kits/components/LazyColumnWithBouncing.kt +0 -6
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/NavigationContainer.kt +1 -4
- package/compose/src/commonMain/kotlin/vn/momo/kits/navigation/Navigator.kt +0 -10
- package/gradle.properties +1 -1
- package/package.json +1 -1
package/compose/build.gradle.kts
CHANGED
package/compose/compose.podspec
CHANGED
|
@@ -55,8 +55,6 @@ import androidx.compose.ui.unit.dp
|
|
|
55
55
|
import kotlinx.coroutines.flow.collect
|
|
56
56
|
import kotlinx.coroutines.flow.combine
|
|
57
57
|
import kotlinx.coroutines.flow.distinctUntilChanged
|
|
58
|
-
import kotlinx.coroutines.launch
|
|
59
|
-
import androidx.compose.runtime.rememberCoroutineScope
|
|
60
58
|
import vn.momo.kits.const.Spacing
|
|
61
59
|
import vn.momo.kits.modifier.conditional
|
|
62
60
|
import vn.momo.kits.platform.getPlatformName
|
|
@@ -98,12 +96,10 @@ fun LazyColumnWithBouncing(
|
|
|
98
96
|
flingBehavior: FlingBehavior = ScrollableDefaults.flingBehavior(),
|
|
99
97
|
userScrollEnabled: Boolean = true,
|
|
100
98
|
pullRefreshState: PullToRefreshCustomState? = null,
|
|
101
|
-
scrollToTopOnStatusBarTap: Boolean = true,
|
|
102
99
|
content: LazyListScope.() -> Unit,
|
|
103
100
|
) {
|
|
104
101
|
val height = remember { mutableIntStateOf(0) }
|
|
105
102
|
val maxConstraint = remember { mutableIntStateOf(0) }
|
|
106
|
-
val scope = rememberCoroutineScope()
|
|
107
103
|
|
|
108
104
|
LaunchedEffect(Unit) {
|
|
109
105
|
val addOn = 1
|
|
@@ -123,8 +119,6 @@ fun LazyColumnWithBouncing(
|
|
|
123
119
|
}.collect()
|
|
124
120
|
}
|
|
125
121
|
|
|
126
|
-
|
|
127
|
-
|
|
128
122
|
val measureLayout =
|
|
129
123
|
remember<MeasureScope.(Measurable, Constraints) -> MeasureResult>(maxConstraint) {
|
|
130
124
|
{ m, c ->
|
|
@@ -4,8 +4,6 @@ import androidx.compose.animation.*
|
|
|
4
4
|
import androidx.compose.animation.core.tween
|
|
5
5
|
import androidx.compose.runtime.*
|
|
6
6
|
import androidx.compose.ui.unit.Dp
|
|
7
|
-
import androidx.lifecycle.Lifecycle
|
|
8
|
-
import androidx.lifecycle.compose.LifecycleEventEffect
|
|
9
7
|
import androidx.navigation.compose.NavHost
|
|
10
8
|
import androidx.navigation.compose.composable
|
|
11
9
|
import androidx.navigation.compose.rememberNavController
|
|
@@ -29,7 +27,7 @@ fun NavigationContainer(
|
|
|
29
27
|
statusBarHeight: Dp? = null,
|
|
30
28
|
config: KitConfig? = null,
|
|
31
29
|
language: String? = null
|
|
32
|
-
)
|
|
30
|
+
){
|
|
33
31
|
val navController = rememberNavController()
|
|
34
32
|
val navigator = remember { Navigator(navController = navController, maxApi = maxApi) }
|
|
35
33
|
val statusBarHeight = statusBarHeight ?: getAppStatusBarHeight()
|
|
@@ -49,7 +47,6 @@ fun NavigationContainer(
|
|
|
49
47
|
)
|
|
50
48
|
)
|
|
51
49
|
}
|
|
52
|
-
|
|
53
50
|
}
|
|
54
51
|
|
|
55
52
|
val startDestination = DynamicScreenRegistry.register(initialScreenName, initialScreen, options)
|
|
@@ -9,7 +9,6 @@ import androidx.compose.runtime.staticCompositionLocalOf
|
|
|
9
9
|
import androidx.compose.ui.Alignment
|
|
10
10
|
import androidx.compose.ui.Modifier
|
|
11
11
|
import androidx.navigation.NavController
|
|
12
|
-
import androidx.navigation.toRoute
|
|
13
12
|
import kotlinx.coroutines.CoroutineScope
|
|
14
13
|
import kotlinx.coroutines.Dispatchers
|
|
15
14
|
import kotlinx.coroutines.SupervisorJob
|
|
@@ -188,7 +187,6 @@ object DynamicScreenRegistry {
|
|
|
188
187
|
|
|
189
188
|
fun register(screenName: String, content: @Composable () -> Unit, options: NavigationOptions?): DynamicScreenRoute {
|
|
190
189
|
val id = idCounter++
|
|
191
|
-
println("getLatestScreen register la ${id} ")
|
|
192
190
|
screens[id] = DynamicScreen(
|
|
193
191
|
id = id,
|
|
194
192
|
name = screenName,
|
|
@@ -218,14 +216,6 @@ object DynamicScreenRegistry {
|
|
|
218
216
|
fun setOptions(id: Int, options: NavigationOptions){
|
|
219
217
|
screens[id]?.options = options
|
|
220
218
|
}
|
|
221
|
-
|
|
222
|
-
fun scrollToTop() {
|
|
223
|
-
//
|
|
224
|
-
println("getLatestScreen la ${screens.keys.joinToString(separator = ",") { it.toString() }}")
|
|
225
|
-
println("getLatestScreen la ${getLatestScreen()?.id}")
|
|
226
|
-
println("getLatestScreen callback la ${getLatestScreen()?.options?.scrollData?.scrollToTopCallback}")
|
|
227
|
-
getLatestScreen()?.options?.scrollData?.scrollToTopCallback?.invoke()
|
|
228
|
-
}
|
|
229
219
|
}
|
|
230
220
|
|
|
231
221
|
|
package/gradle.properties
CHANGED
|
@@ -18,7 +18,7 @@ kotlin.apple.xcodeCompatibility.nowarn=true
|
|
|
18
18
|
name="ComposeKits"
|
|
19
19
|
group=vn.momo.kits
|
|
20
20
|
artifact.id=kits
|
|
21
|
-
version=0.160.1-scrolltotop.
|
|
21
|
+
version=0.160.1-scrolltotop.22
|
|
22
22
|
|
|
23
23
|
repo=GitLab
|
|
24
24
|
url=https://gitlab.mservice.com.vn/api/v4/projects/5400/packages/maven
|