cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Grieve <>
Subject and onPause/onResume
Date Fri, 24 Aug 2012 15:37:29 GMT
I was looking through the channel code and noticed that the fired state is
never assigned to false. This makes sense for channels like onDeviceReady,
when you'd want this to stay active. But...

It's a bit strange for things like onPause and onResume. It means that if
the app has ever been paused or resumed, then every new listener going
forward is going to fire upon subscription even though the current state is
not paused/resumed. I tested this out locally, and it appears to be true.

How about we add a method called "fireOnce", which calls fire() and then
sets fired = false so that new subscribers will not be immediately

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message