Skip to content

Commit

Permalink
Merge pull request #705 from bumble-tech/ChildAwareExt-generics-fix
Browse files Browse the repository at this point in the history
Sync ChildAwareExt generics with ChildAware
  • Loading branch information
KovalevAndrey authored May 17, 2024
2 parents c7372dc + 3addcd2 commit a627022
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
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

0 comments on commit a627022

Please sign in to comment.