File tree Expand file tree Collapse file tree
material3/adaptive/adaptive-layout/src
jsMain/kotlin/androidx/compose/material3/adaptive/layout
wasmJsMain/kotlin/androidx/compose/material3/adaptive/layout
ui/ui-text/src/webMain/kotlin/androidx/compose/ui/text/platform
lifecycle/lifecycle-viewmodel-compose/src
jsMain/kotlin/androidx/lifecycle/viewmodel/compose
wasmJsMain/kotlin/androidx/lifecycle/viewmodel/compose Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2026 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package androidx.compose.material3.adaptive.layout
18+
19+ import androidx.compose.ui.Modifier
20+
21+ @Suppress(" NOTHING_TO_INLINE" )
22+ internal actual inline fun Modifier.Element.isGraphicsLayerElement (): Boolean {
23+ // TODO: remove this when k/js supports qualifiedName - https://youtrack.jetbrains.com/issue/KT-34534/Kotlin-JS-Add-compiler-intrinsic-for-KClass.qualifiedName
24+ // then all kotlin targets will rely on `qualifiedName` and there will be no need in expect/actual
25+ return this ::class .simpleName == " GraphicsLayerElement"
26+ }
Original file line number Diff line number Diff line change 1616
1717package androidx.compose.material3.adaptive.layout
1818
19+ import androidx.compose.ui.Modifier
1920@Suppress(" NOTHING_TO_INLINE" )
20- internal actual inline fun androidx.compose.ui.Modifier.Element.isGraphicsLayerElement (): Boolean {
21- // TODO: remove this after update to kotlin 2.3.0, where qualifiedName is available for k/wasm
22- return this ::class .simpleName == " GraphicsLayerElement"
21+ internal actual inline fun Modifier.Element.isGraphicsLayerElement (): Boolean {
22+ return this ::class .qualifiedName == " androidx.compose.ui.graphics.GraphicsLayerElement"
2323}
Original file line number Diff line number Diff line change @@ -22,9 +22,13 @@ actual sealed class PlatformFont : Font {
2222 actual abstract val identity: String
2323 actual abstract val variationSettings: FontVariation .Settings
2424 internal actual val cacheKey: String
25- // Unlike k/jvm and k/native, `this::class.qualifiedName` API is not available for k/js and k/wasm.
25+ // Unlike k/jvm and k/native, `this::class.qualifiedName` API is not available in k/js.
26+ // https://youtrack.jetbrains.com/issue/KT-34534
27+ // `class.qualifiedName` is supported in k/wasm since 2.3.0 - https://youtrack.jetbrains.com/issue/KT-69621
28+ // But for simplicity we keep using simpleName for now.
29+ // Reasoning:
2630 // Example: given LoadedFont(identity="abc", ...), it will return "LoadedFont|abc"
27- // Such implementation is sufficient since PlatformFont is a sealed class, and
31+ // Such implementation is enough since PlatformFont is a sealed class, and
2832 // we control all of its variants (subclasses).
2933 get() = " ${this ::class .simpleName} |$identity |weight=${weight.weight} |style=$style |variationSettings=${variationSettings.settings} "
3034}
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2024 The Android Open Source Project
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * http://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+
17+ package androidx.lifecycle.viewmodel.compose
18+
19+ // TODO: remove expect actual when k/js support `qualifiedName`
20+ // https://youtrack.jetbrains.com/issue/KT-34534/Kotlin-JS-Add-compiler-intrinsic-for-KClass.qualifiedName
21+ internal actual fun getSaveableKeyPrefix (thisRef : Any? ): String =
22+ if (thisRef != null ) thisRef::class .simpleName + " ." else " "
File renamed without changes.
You can’t perform that action at this time.
0 commit comments