Comet fixes

This fixes a handful of bugs that when taken together kept things mostly working!

  - Unify lastListenerTime (which was previously always zero) with
    lastListenTime
  - Make lastRenderTime, delta timestamps, and lastListenerTime
    consistent with each other as they are directly compared
  - More accurately track whether any deltas have been sent
  - Pretend initial render happened at creation time to prevent a second
    render call from running on the initial Listen message
  - Rename devMode to alwaysReRenderOnPageLoad
Ah, yeah, makes sense. I'll take a look and yell if I get stuck.

On Wed, Dec 3, 2014 at 11:16 PM, Antonio Salazar Cardozo <
notifications@github.com> wrote:

> In web/webkit/src/main/scala/net/liftweb/http/CometActor.scala:
>
> > @@ -474,12 +479,32 @@ trait CometActor extends LiftActor with LiftCometActor with CssBindImplicits {
> >     */
> >    def lastListenerTime: Long = _lastListenerTime
> >
> > +  def lastRenderTime: Long =  _lastRenderTime
> > +
> > +  /**
> > +    * If this method returns true, this CometActor will be treated as a source
> > +    * of continuous partial updates. Usually the basic assumption of a Lift
> > +    * Comet Actor is that render will display the current state of the actor.
> > +    * Partial updates may modify that display, but it is always possible to
> > +    * recreate the complete display by calling render again (in which case
> > +    * pending partial updates can be safely discarded). If this method
> > +    * returns true, render will not be called, but partial updates are
> > +    * guaranteed to always be sent to the client. This is useful as a means to
> > +    * push arbitrary JavaScript to the client without a distinct UI for the
> > +    * comet actor itself.
> > +    */
> > +  protected def partialUpdateStream_? : Boolean = false
>
> (Worth noting: I'd be down to do this refactoring myself, since I've also
> been meaning to make the two anonymous comet subclasses in LiftSession
> named subclasses for clarity.)
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/lift/framework/pull/1619/files#r21269942>.
>