@momo-kits/native-kits 0.300.4-debug → 0.300.5-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/iosMain/kotlin/vn/momo/kits/navigation/ScrollToTop.ios.kt +4 -6
- package/gradle/libs.versions.toml +1 -1
- package/gradle.properties +1 -1
- package/ios/native-kits.podspec +1 -1
- package/ios-demo/MoMoUIKitsDemo.podspec +1 -1
- package/package.json +1 -1
package/compose/build.gradle.kts
CHANGED
package/compose/compose.podspec
CHANGED
|
@@ -6,15 +6,15 @@ import platform.Foundation.NSNotification
|
|
|
6
6
|
import platform.Foundation.NSNotificationCenter
|
|
7
7
|
import platform.Foundation.NSOperationQueue
|
|
8
8
|
import platform.darwin.NSObjectProtocol
|
|
9
|
+
import vn.momo.maxapi.contract.observability.logging.model.LogLevel
|
|
9
10
|
|
|
10
11
|
private const val STATUS_BAR_TAPPED_NOTIFICATION = "statusBarSelected"
|
|
11
12
|
|
|
12
13
|
@Composable
|
|
13
14
|
internal actual fun RegisterScrollToTop(callback: (() -> Unit)?) {
|
|
14
15
|
val maxApi = LocalMaxApi.current
|
|
15
|
-
// AI-GENERATED START: capture the current typed logger client
|
|
16
16
|
DisposableEffect(callback, maxApi) {
|
|
17
|
-
|
|
17
|
+
val logger = if (callback != null) maxApi?.openLogger() else null
|
|
18
18
|
val token: NSObjectProtocol? = if (callback != null) {
|
|
19
19
|
NSNotificationCenter.defaultCenter.addObserverForName(
|
|
20
20
|
name = STATUS_BAR_TAPPED_NOTIFICATION,
|
|
@@ -22,15 +22,13 @@ internal actual fun RegisterScrollToTop(callback: (() -> Unit)?) {
|
|
|
22
22
|
queue = NSOperationQueue.mainQueue,
|
|
23
23
|
) { _: NSNotification? ->
|
|
24
24
|
runCatching { callback() }.onFailure {
|
|
25
|
-
|
|
26
|
-
maxApi?.writeLog("[ScrollToTop] callback threw: ${it.message}")
|
|
27
|
-
// AI-GENERATED END: use typed host logging
|
|
28
|
-
|
|
25
|
+
logger?.log(LogLevel.ERROR, "[ScrollToTop] callback failed")
|
|
29
26
|
}
|
|
30
27
|
}
|
|
31
28
|
} else null
|
|
32
29
|
onDispose {
|
|
33
30
|
token?.let { NSNotificationCenter.defaultCenter.removeObserver(it) }
|
|
31
|
+
logger?.close()
|
|
34
32
|
}
|
|
35
33
|
}
|
|
36
34
|
}
|
package/gradle.properties
CHANGED
package/ios/native-kits.podspec
CHANGED