Fixed dismissing an activity toast when its activity is not visible

When dismiss was called while another activity was on top (likely also
when user has switched to another app), the toast was not dismissed.