-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1186 from joreilly/ios_ui_updates
iOS ui updates
- Loading branch information
Showing
7 changed files
with
46 additions
and
60 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 11 additions & 10 deletions
21
shared/src/iosMain/kotlin/dev/johnoreilly/confetti/ui/SharedViewControllers.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,22 @@ | ||
package dev.johnoreilly.confetti.ui | ||
|
||
import androidx.compose.material3.MaterialTheme | ||
import androidx.compose.material3.lightColorScheme | ||
import androidx.compose.ui.graphics.Color | ||
import androidx.compose.ui.window.ComposeUIViewController | ||
import dev.johnoreilly.confetti.GetConferencesQuery | ||
import dev.johnoreilly.confetti.fragment.SessionDetails | ||
import platform.UIKit.UIViewController | ||
|
||
fun SessionDetailsViewController(session: SessionDetails, onSpeakerClick: (speakerId: String) -> Unit, onSocialLinkClicked: (String) -> Unit): UIViewController = | ||
fun SessionDetailsViewController(session: SessionDetails, conferenceThemeColor: String?, onSpeakerClick: (speakerId: String) -> Unit, onSocialLinkClicked: (String) -> Unit): UIViewController = | ||
ComposeUIViewController { | ||
// iOS specific colors...just adding like this as test for now | ||
val colorScheme = lightColorScheme( | ||
primary = Color(0xFF007AFF), | ||
surface = Color(0xFFFFFFFF) | ||
) | ||
|
||
MaterialTheme(colorScheme = colorScheme) { | ||
ConferenceMaterialTheme(conferenceThemeColor) { | ||
SessionDetailViewShared(session, onSpeakerClick, onSocialLinkClicked) | ||
} | ||
} | ||
|
||
|
||
fun ConferenceListViewController(conferenceListByYear: Map<Int, List<GetConferencesQuery.Conference>>, onConferenceClick: (GetConferencesQuery.Conference) -> Unit): UIViewController = | ||
ComposeUIViewController { | ||
MaterialTheme { | ||
ConferenceListView(conferenceListByYear, onConferenceClick) | ||
} | ||
} |