Change Suspended(true/false) => Suspended/Resumed (#959)

This commit is contained in:
Felix Rabe 2019-06-22 04:59:31 +02:00 committed by Hal Gentz
parent 1193cada46
commit f457c6a0b8
6 changed files with 17 additions and 13 deletions

View file

@ -37,10 +37,11 @@ pub enum Event<T> {
/// emitted, it is guaranteed to be the last event emitted.
LoopDestroyed,
/// Emitted when the application has been suspended or resumed.
///
/// The parameter is true if app was suspended, and false if it has been resumed.
Suspended(bool),
/// Emitted when the application has been suspended.
Suspended,
/// Emitted when the application has been resumed.
Resumed,
}
impl<T> Event<T> {
@ -53,7 +54,8 @@ impl<T> Event<T> {
NewEvents(cause) => Ok(NewEvents(cause)),
EventsCleared => Ok(EventsCleared),
LoopDestroyed => Ok(LoopDestroyed),
Suspended(suspended) => Ok(Suspended(suspended)),
Suspended => Ok(Suspended),
Resumed => Ok(Resumed),
}
}
}