Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [Compose Multiplatform] When you tap the action label on the snack bar that appears when you don't have permission to access the calendar, the iOS Settings app will now open. #907

Conversation

Corvus400
Copy link
Contributor

@Corvus400 Corvus400 commented Aug 31, 2024

Issue

Overview (Required)

  • I used UIApplicationOpenSettingsURLString to open the iOS Settings app from the DroidKaigi app.
  • For the processing when the label in the snack bar is tapped, I referred to the processing in TimetableItemDetailPresenter.

val result = userMessageStateHolder.showMessage(
message = bookmarkedSuccessfullyString,
actionLabel = viewBookmarkListString,
duration = Short,
)
if (result == ActionPerformed) {
shouldGoToFavoriteList = true
}

LaunchedEffect(uiState is Loaded && uiState.shouldGoToFavoriteList) {
if (uiState is Loaded && uiState.shouldGoToFavoriteList) {
eventFlow.tryEmit(TimetableItemDetailEvent.FavoriteListNavigated)
onFavoriteListClick()
}
}

Links

Movie (Optional)

Before After
before.mov
after.mov

TODO

  • I noticed this when I took a video, but when I go back to the app after granting permission on the settings screen, the Compose Multiplatform screen closes and the iOS Native screen appears.
  • This issue needs to be addressed in a separate issue.

@github-actions github-actions bot temporarily deployed to deploygate-distribution August 31, 2024 22:33 Inactive
@Corvus400 Corvus400 changed the title [Compose Multiplatform] ✨ When you tap the action label on the snack bar that appears when you don't have permission to access the calendar, the iOS Settings app will now open. ✨ [Compose Multiplatform] When you tap the action label on the snack bar that appears when you don't have permission to access the calendar, the iOS Settings app will now open. Aug 31, 2024
…feature/open_settings_app_from_timetable_detail_snack_bar_compose_multiplatform

# Conflicts:
#	app-ios-shared/src/commonMain/kotlin/io/github/droidkaigi/confsched/shared/IosComposeKaigiApp.kt
@github-actions github-actions bot temporarily deployed to deploygate-distribution September 1, 2024 06:52 Inactive
@Corvus400 Corvus400 marked this pull request as ready for review September 1, 2024 07:07
LaunchedEffect(uiState.shouldGoToSettingsApp) {
if (uiState.shouldGoToSettingsApp) {
eventFlow.tryEmit(IosComposeKaigiAppEvent.SettingsAppNavigated)
openSettingsApp()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I think we can include rememberExternalNavController() as a parameter in KaigiApp.

…avHost to KaigiApp.

And I moved the process of opening the settings app to ExternalNavController.
@Corvus400 Corvus400 requested a review from takahirom September 1, 2024 10:09
@github-actions github-actions bot temporarily deployed to deploygate-distribution September 1, 2024 10:11 Inactive
Copy link
Member

@takahirom takahirom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! Thank you for your contribution!

@takahirom takahirom merged commit cffab40 into DroidKaigi:main Sep 1, 2024
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants