mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
No default values for expect functions 4
This commit is contained in:
@@ -22,7 +22,7 @@ import cafe.adriel.voyager.core.screen.Screen
|
||||
actual interface ViewModelComponent : SharedViewModelComponent
|
||||
|
||||
@Composable
|
||||
actual inline fun <reified VM : ViewModel> Screen.stateViewModel(
|
||||
actual inline fun <reified VM : ViewModel> Screen.realStateViewModel(
|
||||
tag: String?,
|
||||
crossinline factory: @DisallowComposableCalls ViewModelComponent.(SavedStateHandle) -> VM
|
||||
): VM {
|
||||
|
||||
@@ -15,13 +15,13 @@ import androidx.compose.ui.unit.DpOffset
|
||||
|
||||
actual interface TooltipPlacement
|
||||
|
||||
actual class CursorPoint actual constructor(
|
||||
actual class CursorPointImpl actual constructor(
|
||||
offset: DpOffset,
|
||||
alignment: Alignment,
|
||||
windowMargin: Dp
|
||||
) : TooltipPlacement
|
||||
|
||||
actual class ComponentRect actual constructor(
|
||||
actual class ComponentRectImpl actual constructor(
|
||||
anchor: Alignment,
|
||||
alignment: Alignment,
|
||||
offset: DpOffset
|
||||
|
||||
@@ -72,9 +72,15 @@ interface SharedViewModelComponent {
|
||||
expect interface ViewModelComponent : SharedViewModelComponent
|
||||
|
||||
@Composable
|
||||
expect inline fun <reified VM : ViewModel> Screen.stateViewModel(
|
||||
inline fun <reified VM : ViewModel> Screen.stateViewModel(
|
||||
tag: String? = null,
|
||||
crossinline factory: @DisallowComposableCalls ViewModelComponent.(SavedStateHandle) -> VM
|
||||
): VM = realStateViewModel(tag, factory)
|
||||
|
||||
@Composable
|
||||
expect inline fun <reified VM : ViewModel> Screen.realStateViewModel(
|
||||
tag: String?,
|
||||
crossinline factory: @DisallowComposableCalls ViewModelComponent.(SavedStateHandle) -> VM
|
||||
): VM
|
||||
|
||||
@Composable
|
||||
|
||||
@@ -17,30 +17,30 @@ import androidx.compose.ui.unit.dp
|
||||
@ExperimentalFoundationApi
|
||||
expect interface TooltipPlacement
|
||||
|
||||
fun TooltipPlacement.CursorPoint(
|
||||
fun CursorPoint(
|
||||
offset: DpOffset = DpOffset.Zero,
|
||||
alignment: Alignment = Alignment.BottomEnd,
|
||||
windowMargin: Dp = 4.dp
|
||||
) = ca.gosyer.jui.ui.base.components.CursorPoint(offset, alignment, windowMargin)
|
||||
) = CursorPointImpl(offset, alignment, windowMargin)
|
||||
|
||||
@ExperimentalFoundationApi
|
||||
expect class CursorPoint(
|
||||
offset: DpOffset = DpOffset.Zero,
|
||||
alignment: Alignment = Alignment.BottomEnd,
|
||||
windowMargin: Dp = 4.dp
|
||||
expect class CursorPointImpl(
|
||||
offset: DpOffset,
|
||||
alignment: Alignment,
|
||||
windowMargin: Dp
|
||||
) : TooltipPlacement
|
||||
|
||||
fun TooltipPlacement.ComponentRect(
|
||||
fun ComponentRect(
|
||||
anchor: Alignment = Alignment.BottomCenter,
|
||||
alignment: Alignment = Alignment.BottomCenter,
|
||||
offset: DpOffset = DpOffset.Zero
|
||||
) = ca.gosyer.jui.ui.base.components.ComponentRect(anchor, alignment, offset)
|
||||
) = ca.gosyer.jui.ui.base.components.ComponentRectImpl(anchor, alignment, offset)
|
||||
|
||||
@ExperimentalFoundationApi
|
||||
expect class ComponentRect(
|
||||
anchor: Alignment = Alignment.BottomCenter,
|
||||
alignment: Alignment = Alignment.BottomCenter,
|
||||
offset: DpOffset = DpOffset.Zero
|
||||
expect class ComponentRectImpl(
|
||||
anchor: Alignment,
|
||||
alignment: Alignment,
|
||||
offset: DpOffset
|
||||
) : TooltipPlacement
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
|
||||
@@ -21,7 +21,7 @@ actual interface ViewModelComponent : SharedViewModelComponent {
|
||||
}
|
||||
|
||||
@Composable
|
||||
actual inline fun <reified VM : ViewModel> Screen.stateViewModel(
|
||||
actual inline fun <reified VM : ViewModel> Screen.realStateViewModel(
|
||||
tag: String?,
|
||||
crossinline factory: @DisallowComposableCalls ViewModelComponent.(SavedStateHandle) -> VM
|
||||
): VM {
|
||||
|
||||
@@ -12,9 +12,9 @@ import androidx.compose.ui.Modifier
|
||||
|
||||
actual typealias TooltipPlacement = androidx.compose.foundation.TooltipPlacement
|
||||
|
||||
actual typealias CursorPoint = androidx.compose.foundation.TooltipPlacement.CursorPoint
|
||||
actual typealias CursorPointImpl = androidx.compose.foundation.TooltipPlacement.CursorPoint
|
||||
|
||||
actual typealias ComponentRect = androidx.compose.foundation.TooltipPlacement.ComponentRect
|
||||
actual typealias ComponentRectImpl = androidx.compose.foundation.TooltipPlacement.ComponentRect
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
@Composable
|
||||
|
||||
@@ -18,7 +18,7 @@ import cafe.adriel.voyager.core.screen.Screen
|
||||
actual interface ViewModelComponent : SharedViewModelComponent
|
||||
|
||||
@Composable
|
||||
actual inline fun <reified VM : ViewModel> Screen.stateViewModel(
|
||||
actual inline fun <reified VM : ViewModel> Screen.realStateViewModel(
|
||||
tag: String?,
|
||||
crossinline factory: @DisallowComposableCalls ViewModelComponent.(SavedStateHandle) -> VM
|
||||
): VM {
|
||||
|
||||
@@ -15,13 +15,13 @@ import androidx.compose.ui.unit.DpOffset
|
||||
|
||||
actual interface TooltipPlacement
|
||||
|
||||
actual class CursorPoint actual constructor(
|
||||
actual class CursorPointImpl actual constructor(
|
||||
offset: DpOffset,
|
||||
alignment: Alignment,
|
||||
windowMargin: Dp
|
||||
) : TooltipPlacement
|
||||
|
||||
actual class ComponentRect actual constructor(
|
||||
actual class ComponentRectImpl actual constructor(
|
||||
anchor: Alignment,
|
||||
alignment: Alignment,
|
||||
offset: DpOffset
|
||||
|
||||
Reference in New Issue
Block a user