mirror of
https://github.com/fromchat-messenger/app.git
synced 2026-09-22 19:15:05 +03:00
36946fdd06
Signed-off-by: denis0001-dev <denis0001.dev@ya.ru>
26 lines
824 B
Plaintext
26 lines
824 B
Plaintext
---
|
|
description: Prefer utils package APIs when available
|
|
globs: "**/*.kt"
|
|
alwaysApply: true
|
|
---
|
|
|
|
# Utils Package Preference
|
|
|
|
When working with the Android/KMP codebase, prefer APIs from `com.pr0gramm3r101.utils` whenever possible.
|
|
|
|
## Clipboard
|
|
- Use `supportClipboardManagerImpl` (Composable) instead of `LocalClipboardManager` / `LocalClipboard`
|
|
- `SupportClipboardManager.setText(string: String)` is suspend; call from `scope.launch { }`
|
|
|
|
## String
|
|
- Use `String.toAnnotatedString()` for `AnnotatedString` conversion
|
|
|
|
## Modifier
|
|
- Use `Modifier.conditional` from `com.pr0gramm3r101.utils.Compose` for conditional modifiers
|
|
|
|
## CompositionLocal
|
|
- Use `CompositionLocal.invoke()` for `current` when available
|
|
|
|
## Other
|
|
- Check `Utils.kt`, `Compose.kt`, `Components.kt`, `Adaptive.kt` before implementing custom solutions
|