@momo-kits/native-kits 0.162.2-test.6 → 0.162.2-test.7
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.
|
@@ -45,10 +45,10 @@ public final class FontScaleStore: ObservableObject {
|
|
|
45
45
|
guard let api = api, !didBind else { return }
|
|
46
46
|
didBind = true
|
|
47
47
|
|
|
48
|
-
// snapshot
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
48
|
+
// Synchronous snapshot — flash-free first frame. The compose bridge runs the platform API
|
|
49
|
+
// synchronously (getFontScaleConfig's storage flow is take(1), so it completes inline and
|
|
50
|
+
// returns the current value before the first render reads scaleSize/appFont).
|
|
51
|
+
apply(api.request(funcName: "getFontScaleConfig", params: nil))
|
|
52
52
|
// live: re-read on every host write to the key
|
|
53
53
|
observerId = api.request(funcName: "observer", params: ["font_scale_config"]) { [weak self] response in
|
|
54
54
|
self?.apply(response)
|