Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync ChildAwareExt generics with ChildAware #705

Merged
merged 5 commits into from
May 17, 2024
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
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ jobs:

instrumentation-tests:
name: Instrumentation tests
runs-on: macOS-latest
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -119,6 +119,7 @@ jobs:
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: |
adb shell pm list packages -3 | cut -f 2 -d ":" | while read package; do if [ "$package" = "com.bumble.appyx.sample.navigation.compose.test" ] || [ "$package" = "com.bumble.appyx.core.test" ] || [ "$package" = "com.bumble.appyx.interop.ribs.test" ] || [ "$package" = "com.bumble.appyx.sample.navigtion.compose.test" ]; then adb uninstall $package; fi; done
adb logcat > logcat.out &
./gradlew connectedCheck
- name: Upload failed instrumentation artifacts
Expand All @@ -139,4 +140,4 @@ jobs:
with:
python-version: '3.x'
- run: pip install mkdocs-material
- run: mkdocs build --strict
- run: mkdocs build --strict
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Pending changes

- [#705](https://github.com/bumble-tech/appyx/pull/705) – **Fixed**: ChildAware extension functions now allow Any type as a parameter

---

## 1.5.0
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
package com.bumble.appyx.core.children

import com.bumble.appyx.core.node.Node

inline fun <reified T : Node> ChildAware<*>.whenChildAttached(
inline fun <reified T : Any> ChildAware<*>.whenChildAttached(
noinline callback: ChildCallback<T>,
) {
whenChildAttached(T::class, callback)
}

inline fun <reified T1 : Node, reified T2 : Node> ChildAware<*>.whenChildrenAttached(
inline fun <reified T1 : Any, reified T2 : Any> ChildAware<*>.whenChildrenAttached(
noinline callback: ChildrenCallback<T1, T2>,
) {
whenChildrenAttached(T1::class, T2::class, callback)
Expand Down