mirror of
https://github.com/msfjarvis/compose-lobsters
synced 2025-08-14 21:07:04 +05:30
refactor: use immutable collections where flagged by Lint
This commit is contained in:
parent
d7cc55ed53
commit
b969b5f0bf
11 changed files with 22 additions and 43 deletions
|
@ -53,26 +53,4 @@
|
|||
file="src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ComposeUnstableCollections"
|
||||
message="The Compose Compiler cannot infer the stability of a parameter if a List<NavigationItem> is used in it, even if the item type is stable.
You should use Kotlinx Immutable Collections instead: `items: ImmutableList<NavigationItem>` or create an `@Immutable` wrapper for this class: `@Immutable data class ItemsList(val items: List<NavigationItem>)`
See https://slackhq.github.io/compose-lints/rules/#avoid-using-unstable-collections for more information."
|
||||
errorLine1=" items: List<NavigationItem>,"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/dev/msfjarvis/claw/android/ui/decorations/ClawNavigationBar.kt"
|
||||
line="32"
|
||||
column="10"/>
|
||||
</issue>
|
||||
|
||||
<issue
|
||||
id="ComposeUnstableCollections"
|
||||
message="The Compose Compiler cannot infer the stability of a parameter if a Map<Month, List<SavedPost>> is used in it, even if the item type is stable.
You should use Kotlinx Immutable Collections instead: `items: ImmutableMap<Month, List<SavedPost>>` or create an `@Immutable` wrapper for this class: `@Immutable data class ItemsMap(val items: Map<Month, List<SavedPost>>)`
See https://slackhq.github.io/compose-lints/rules/#avoid-using-unstable-collections for more information."
|
||||
errorLine1=" items: Map<Month, List<SavedPost>>,"
|
||||
errorLine2=" ~~~~~~~~~~~~~~~~~~~~~~~~~~~">
|
||||
<location
|
||||
file="src/main/kotlin/dev/msfjarvis/claw/android/ui/lists/DatabasePosts.kt"
|
||||
line="24"
|
||||
column="10"/>
|
||||
</issue>
|
||||
|
||||
</issues>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue