Skip to content

Commit

Permalink
Merge pull request #1542 from joreilly/remove_multipane_option
Browse files Browse the repository at this point in the history
remove redundant decompose multipane option
  • Loading branch information
joreilly authored Mar 9, 2025
2 parents c31f524 + a2fc320 commit 0f7b04b
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 98 deletions.
2 changes: 0 additions & 2 deletions iosApp/iosApp/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ class AppDelegate : NSObject, UIApplicationDelegate, ObservableObject {
}
}
},
isMultiPane: UIDevice.current.userInterfaceIdiom != UIUserInterfaceIdiom.phone,
initialConferenceId: nil,
settingsComponent: nil
)
Expand All @@ -62,7 +61,6 @@ class AppDelegate : NSObject, UIApplicationDelegate, ObservableObject {
),
onSignOut: {},
onSignIn: {},
isMultiPane: UIDevice.current.userInterfaceIdiom != UIUserInterfaceIdiom.phone,
initialConferenceId: conferenceId,
settingsComponent: nil
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ class DefaultAppComponent(
componentContext: ComponentContext,
private val onSignOut: () -> Unit,
private val onSignIn: () -> Unit,
private val isMultiPane: Boolean = false,
initialConferenceId: String? = null,
private val settingsComponent: SettingsComponent? = null
) : AppComponent, KoinComponent, ComponentContext by componentContext {
Expand Down Expand Up @@ -137,7 +136,6 @@ class DefaultAppComponent(
user = user,
conference = config.conference,
conferenceThemeColor = config.conferenceThemeColor,
isMultiPane = isMultiPane,
onSwitchConference = ::showConferences,
onSignOut = {
onSignOut()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ class DefaultConferenceComponent(
private val user: User?,
private val conference: String,
override val conferenceThemeColor: String?,
private val isMultiPane: Boolean,
private val onSwitchConference: () -> Unit,
private val onSignOut: () -> Unit,
private val onSignIn: () -> Unit,
Expand All @@ -63,7 +62,6 @@ class DefaultConferenceComponent(
componentContext = componentContext,
conference = conference,
user = user,
isMultiPane = isMultiPane,
onSwitchConference = onSwitchConference,
onSessionSelected = { navigation.push(Config.SessionDetails(sessionId = it)) },
onSpeakerSelected = { navigation.push(Config.SpeakerDetails(speakerId = it)) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ interface HomeComponent {

sealed class Child {
class Sessions(val component: SessionsComponent) : Child()
class MultiPane(val component: MultiPaneComponent) : Child()
class Speakers(val component: SpeakersComponent) : Child()
class Bookmarks(val component: BookmarksComponent) : Child()
class Venue(val component: VenueComponent) : Child()
Expand All @@ -44,7 +43,6 @@ class DefaultHomeComponent(
componentContext: ComponentContext,
override val conference: String,
override val user: User?,
private val isMultiPane: Boolean,
private val onSwitchConference: () -> Unit,
private val onSessionSelected: (id: String) -> Unit,
private val onSpeakerSelected: (id: String) -> Unit,
Expand All @@ -67,27 +65,15 @@ class DefaultHomeComponent(
private fun child(config: Config, componentContext: ComponentContext): Child =
when (config) {
Config.Sessions ->
if (isMultiPane) {
Child.MultiPane(
DefaultMultiPaneComponent(
componentContext = componentContext,
conference = conference,
user = user,
onSignIn = onSignIn,
onSpeakerSelected = onSpeakerSelected,
)
)
} else {
Child.Sessions(
DefaultSessionsComponent(
componentContext = componentContext,
conference = conference,
user = user,
onSessionSelected = onSessionSelected,
onSignIn = onSignIn,
)
Child.Sessions(
DefaultSessionsComponent(
componentContext = componentContext,
conference = conference,
user = user,
onSessionSelected = onSessionSelected,
onSignIn = onSignIn,
)
}
)

Config.Speakers ->
Child.Speakers(
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,6 @@ fun HomeView(component: HomeComponent) {
snackbarHostState = snackbarHostState
)

is HomeComponent.Child.MultiPane -> Text(text = "Multi-pane mode is not yet supported")
is HomeComponent.Child.Speakers -> SpeakersUI(child.component)
is HomeComponent.Child.Bookmarks ->
BookmarksUI(
Expand Down

0 comments on commit 0f7b04b

Please sign in to comment.