emit playerstopped only if player was loaded
@@ -180,7 +180,7 @@ impl<E: Env + 'static> UpdateWithCtx<E> for Player {
.join(watched_effects)
}
Msg::Action(Action::Unload) => {
- let ended_effects = if !self.ended {
+ let ended_effects = if !self.ended && self.selected.is_some() {
Effects::msg(Msg::Event(Event::PlayerStopped {
context: self.analytics_context.as_ref().cloned().unwrap_or_default(),
}))
