diff --git a/core/src/main/kotlin/io/spine/chords/core/appshell/AppWindow.kt b/core/src/main/kotlin/io/spine/chords/core/appshell/AppWindow.kt index 8a8e034..ee173cf 100644 --- a/core/src/main/kotlin/io/spine/chords/core/appshell/AppWindow.kt +++ b/core/src/main/kotlin/io/spine/chords/core/appshell/AppWindow.kt @@ -73,7 +73,7 @@ public class AppWindow( */ private val signInScreen: SignInScreen = SignInScreen(signInScreenContent) { screenNavigator.pop() - show(mainScreen) + screenNavigator.push(mainScreen) } /** @@ -128,35 +128,6 @@ public class AppWindow( } } - /** - * Makes the given screen the current visible app screen. - * - * This screen will be rendered using the entire area - * of the application window. No other components - * from other screens will be visible or interactable. - * - * @param screen The screen to be shown. - */ - internal fun show(screen: Screen) { - check(bottomDialog == null) { - "Cannot display the screen when a dialog is displayed." - } - screenNavigator.push(screen) - } - - /** - * Closes the currently visible screen. - * - * The currently visible screen won't be saved to the navigation history and - * the bottom-most screen in the history will be displayed. - */ - internal fun closeCurrentScreen() { - check(screenNavigator.size > 1) { - "Cannot close the bottom-most screen `${screenNavigator.lastItem}`." - } - screenNavigator.pop() - } - /** * Selects the given [appView]. */ diff --git a/core/src/main/kotlin/io/spine/chords/core/appshell/Application.kt b/core/src/main/kotlin/io/spine/chords/core/appshell/Application.kt index cd39059..425a0af 100644 --- a/core/src/main/kotlin/io/spine/chords/core/appshell/Application.kt +++ b/core/src/main/kotlin/io/spine/chords/core/appshell/Application.kt @@ -31,7 +31,6 @@ import androidx.compose.runtime.SideEffect import androidx.compose.runtime.remember import androidx.compose.ui.graphics.painter.Painter import androidx.compose.ui.window.application -import cafe.adriel.voyager.core.screen.Screen import io.spine.chords.core.layout.ConfirmationDialog import io.spine.chords.core.layout.Dialog import io.spine.chords.core.layout.DialogDisplayMode @@ -274,28 +273,6 @@ public open class Application( public class ApplicationUI internal constructor(private val appWindow: AppWindow) { - /** - * Displays the given [screen]. - * - * This screen will be rendered using the entire area - * of the application window. No other components - * from other screens will be visible or interactable. - * - * @param screen The screen to be shown. - */ - public fun show(screen: Screen) { - appWindow.show(screen) - } - - /** - * Closes the currently visible screen. - * - * The bottom-most screen in the history will be displayed. - */ - public fun closeCurrentScreen() { - appWindow.closeCurrentScreen() - } - /** * Selects the given [appView]. * diff --git a/core/src/main/kotlin/io/spine/chords/core/layout/Wizard.kt b/core/src/main/kotlin/io/spine/chords/core/layout/Wizard.kt index d556d85..06d039a 100644 --- a/core/src/main/kotlin/io/spine/chords/core/layout/Wizard.kt +++ b/core/src/main/kotlin/io/spine/chords/core/layout/Wizard.kt @@ -62,7 +62,6 @@ import androidx.compose.ui.input.key.Key.Companion.DirectionLeft import androidx.compose.ui.input.key.Key.Companion.DirectionRight import androidx.compose.ui.input.key.Key.Companion.Enter import androidx.compose.ui.unit.dp -import cafe.adriel.voyager.core.screen.Screen import io.spine.chords.core.Component import io.spine.chords.core.keyboard.KeyModifiers.Companion.Alt import io.spine.chords.core.keyboard.KeyModifiers.Companion.Ctrl @@ -95,13 +94,9 @@ private object WizardContentSize { * finished using the wizard, and it needs to be closed. The container where * the wizard is placed is responsible for hiding the wizard (excluding it from * the composition) upon this event. - * - * It implements Voyager's [Screen] since any wizard currently displays - * as an application screen. This will likely be removed once wizards - * are displayed as dialogs. */ @Stable -public abstract class Wizard : Component(), Screen { +public abstract class Wizard : Component() { /** * The text to be the title of the wizard.