Skip to content

Commit 92e2220

Browse files
authored
feat(android): emit LoopDestroyed when exiting the event loop (#1152)
1 parent da1514b commit 92e2220

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

.changes/android-loop-destroyed.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
tao: patch
3+
---
4+
5+
Emit `Event::LoopDestroyed` on activity destroy on Android.

src/platform_impl/android/mod.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,14 @@ impl<T: 'static> EventLoop<T> {
346346
start: Instant::now(),
347347
requested_resume: None,
348348
};
349+
350+
call_event_handler!(
351+
event_handler,
352+
self.window_target(),
353+
control_flow,
354+
event::Event::LoopDestroyed
355+
);
356+
349357
break 'event_loop code;
350358
}
351359
ControlFlow::Poll => {

0 commit comments

Comments
 (0)