korlibs / korlibs/korlibs-template

The Korge Filter "uniq" is not working

Open
#8 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
1
Forks
0
PR merge metrics
No merged PRs in 30d

Description

Hi Korge Team,

we are using the korte feature quite a bit now and really like it. Thanks for the good work!
When using it we found that the `uniq` filter is not working.

The code is here: [korge-core/src/common/korlibs/template/KorteDefaults.kt](https://github.com/korlibs/korge/blob/ff6bc9a38cdb2847b08d1c9ac81749925d127219/korge-core/src/common/korlibs/template/KorteDefaults.kt#L102C1-L102C1)

The implementation is:
```
val Uniq = KorteFilter("uniq") {
this.toDynamicList().distinct()
}
```

but it should be
```
val Uniq = KorteFilter("uniq") {
this.subject.toDynamicList().distinct()
}
```

Since I haven't submitted any changes here yet and haven't checked the project out. I thought it was easier to report it here. If you want, i can try to open a Pull request when I find time though.

Regards,
Arne

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect korge-core/src/common/korlibs/template/KorteDefaults.kt around the KorteFilter("uniq") definition. Verify how the filter accesses its input, then confirm that duplicate values are removed from the subject; the issue's proposed behavior defines when this is done.

Written by the indexing model from the issue text.

Assessment

Tech stack
kotlin
Domain
tooling
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.