Closed lorensr closed 8 years ago
@lorensr: Can't do that without a better API. If we update automatically at that point, and there is a newer HCP waiting, it will take multiple starts of the app to get it up to date.
I see. I was thinking about my only-post-install scenario.
In the general case, to avoid the situation you mention, you could do it only when it's not initially available:
if updateAvailable
# check for even newer update
setTimeout ->
if updateAvailable
update()
else
release()
, downloadDelay
else
# wait until available or give up on timeout
Tracker.autorun (c) ->
if updateAvailable
update()
setTimeout ->
c.stop()
release()
, downloadDelay
@lorensr - Playing with possible ways to do this with options. I've added a section to the Readme outlining possible refresh
and check
options. Can you think of any scenarios that a combination of these wouldn't cover?
https://github.com/jamielob/reloader/tree/master/packages/reloader#possible-refresh-modes
Looks good! Not clear from check section what happens during checking (launchscreen up)
Very good point!
@lorensr - I've refactored the package and simplified the options. I believe that I still cover all of the use cases we discussed. Your main case would simply be covered by setting Reloader.check = 'firstStart'
.
Here's the new readme: https://github.com/jamielob/reloader/tree/master/packages/reloader
Mind giving it a spin?
Thanks! I will once I switch to 1.3 :) few notes now tho:
Reloader.configure({
check: 'firstStart',
checkTimer: 6000
})
Items 1 and 3 taken care of and you're not getting 2 ;)
Yay!
Now see if I was nitpicking I would say who doesn't have spaces after // ?! 😜
//AllTheRageInEurope
Oh, I guess that's okay then. Europeans are supposed to be cultured.
On Wed, Apr 20, 2016 at 8:06 PM, Jamie Loberman notifications@github.com wrote:
//AllTheRageInEurope
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/jamielob/reloader/issues/1#issuecomment-212659406
Alright, I figured out the right lisp to get my editor to switch to tabs. Just for you 😊
On Wed, Apr 20, 2016 at 8:06 PM, Loren Sands-Ramshaw lorensr@gmail.com wrote:
Oh, I guess that's okay then. Europeans are supposed to be cultured.
On Wed, Apr 20, 2016 at 8:06 PM, Jamie Loberman notifications@github.com wrote:
//AllTheRageInEurope
— You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub https://github.com/jamielob/reloader/issues/1#issuecomment-212659406
Haha. did you see this commit: https://github.com/jamielob/reloader/commit/e511abe85058a3c3a70debfc09dd0a4473924343
https://github.com/jamielob/reloader/blob/master/packages/reloader/reloader.js#L42-L63
Timer should be worst-case – can also have an
autorun
that does it immediately onupdateAvailable
true