Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.MD
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ See SKILL.md files in the [skills folders](.copilot/skills/) for available agent
- `ApiResult<T>` / `ActionResult<S, E>` for error handling
- Type-safe navigation: `Destination` sealed class with injected `Navigator` for ViewModel-initiated navigation.
- Koin DI: `viewModelOf()`, `factoryOf()`, `singleOf()`, feature modules
- `ViewStateString` for string logic in ViewModel
- `ViewStateString` for string logic in ViewModel. See guideline in the `ViewStateString` class for usage.
- `Res` object for shared resources (Compose Multiplatform Resources)
- Swift-facing Kotlin types live in a module that is `export`ed from the framework block in `shared/build.gradle.kts`; everything else in `shared/` stays `internal` so it does not end up in the iOS framework header. See README for why.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ import org.jetbrains.compose.resources.StringResource
*
* There is one edge case: the formatArgs are not refreshed on config changes, so if you use a string with a
* replacement parameter that is f.e. a localized date string, move your logic to the view instead of using [ViewStateString].
*
* Guideline: Only use ViewStateString when needed. UI components should either receive strings directly, or a ViewState,
* (but that ViewState that may still may contain a ViewStateString if needed).
Comment thread
tom0334 marked this conversation as resolved.
* (If you can simply use the native `stringResource` because you are in a composable context, you probably don't need [ViewStateString]).
*/
sealed class ViewStateString {
data class Res(
Expand Down