Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit c738a8cc authored by Alejandro Nijamkin's avatar Alejandro Nijamkin
Browse files

repeatWhenAttached

This new View extension function replaces WindowAddedViewLifecycleOwner and is
intended for use with views that are not part of an activity.

It is more correct because it properly disposes itself and stops
all previously launched coroutines/jobs when the view is detached from
its view hierarchy.

Test: Extensive unit tests included. Also tested manually making sure that there are no
crashes and that jobs scheduled by a view-binder are properly cleaned up
when the view is detached and replaced by a different view when changing
device configuration using:

$ adb shell wm density 1000

Bug: 235403546
Change-Id: Ied36c9e1735333c482fc82cfbe28e665083795ae
parent f0734a24
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment