-
Notifications
You must be signed in to change notification settings - Fork 201
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into design/display_a_shadow_instead_of_a_line
- Loading branch information
Showing
44 changed files
with
653 additions
and
109 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
5 changes: 5 additions & 0 deletions
5
app-ios-shared/src/commonMain/composeResources/values-ja/strings.xml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="permission_required">セッションを予定として追加するには、カレンダーへのアクセス権限が必要です。</string> | ||
<string name="open_settings">設定を開く</string> | ||
</resources> |
5 changes: 5 additions & 0 deletions
5
app-ios-shared/src/commonMain/composeResources/values/strings.xml
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<resources> | ||
<string name="permission_required">To add a session as a scheduled event, you need access permission to the calendar.</string> | ||
<string name="open_settings">Open settings.</string> | ||
</resources> |
8 changes: 8 additions & 0 deletions
8
...ios-shared/src/commonMain/kotlin/io/github/droidkaigi/confsched/shared/AppIosSharedRes.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.github.droidkaigi.confsched.shared | ||
|
||
import conference_app_2024.app_ios_shared.generated.resources.Res | ||
|
||
object AppIosSharedRes { | ||
val drawable = Res.drawable | ||
val string = Res.string | ||
} |
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
51 changes: 51 additions & 0 deletions
51
...rc/commonMain/kotlin/io/github/droidkaigi/confsched/shared/IosComposeKaigiAppPresenter.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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
package io.github.droidkaigi.confsched.shared | ||
|
||
import androidx.compose.runtime.Composable | ||
import androidx.compose.runtime.getValue | ||
import androidx.compose.runtime.mutableStateOf | ||
import androidx.compose.runtime.remember | ||
import androidx.compose.runtime.setValue | ||
import io.github.droidkaigi.confsched.compose.EventEffect | ||
import io.github.droidkaigi.confsched.compose.EventFlow | ||
import io.github.droidkaigi.confsched.droidkaigiui.UserMessageResult.ActionPerformed | ||
import io.github.droidkaigi.confsched.droidkaigiui.providePresenterDefaults | ||
import io.github.droidkaigi.confsched.shared.IosComposeKaigiAppEvent.SettingsAppNavigated | ||
import io.github.droidkaigi.confsched.shared.IosComposeKaigiAppEvent.ShowRequiresAuthorization | ||
|
||
sealed interface IosComposeKaigiAppEvent { | ||
data class ShowRequiresAuthorization( | ||
val snackbarMessage: String, | ||
val actionLabel: String, | ||
) : IosComposeKaigiAppEvent | ||
|
||
data object SettingsAppNavigated : IosComposeKaigiAppEvent | ||
} | ||
|
||
@Composable | ||
fun iosComposeKaigiAppPresenter( | ||
events: EventFlow<IosComposeKaigiAppEvent> | ||
) : IosComposeKaigiAppUiState = providePresenterDefaults { userMessageStateHolder -> | ||
var shouldGoToSettingsApp by remember { mutableStateOf(false) } | ||
|
||
EventEffect(events) { event -> | ||
when (event) { | ||
is ShowRequiresAuthorization -> { | ||
val result = userMessageStateHolder.showMessage( | ||
message = event.snackbarMessage, | ||
actionLabel = event.actionLabel, | ||
) | ||
if (result == ActionPerformed) { | ||
shouldGoToSettingsApp = true | ||
} | ||
} | ||
|
||
SettingsAppNavigated -> { | ||
shouldGoToSettingsApp = false | ||
} | ||
} | ||
} | ||
IosComposeKaigiAppUiState( | ||
userMessageStateHolder = userMessageStateHolder, | ||
shouldGoToSettingsApp = shouldGoToSettingsApp, | ||
) | ||
} |
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
Oops, something went wrong.