On Wed, Nov 24, 2010 at 11:58 AM, David Wang <[email protected]> wrote:
> > > On Wed, Nov 24, 2010 at 11:30 AM, Michael MacFadden < > [email protected]> wrote: > >> All, >> >> I am about halfway through implementing the new style inline thread >> indicators showing the count of read/unread blips. I have faked the >> current count numbers to this point, focusing mainly on the rendering >> issues. I am ready to takle the count and read / unread state >> changes. I had a couple questions I was hoping the community might be >> able to help with: >> > > I'll answer some of the questions below, and the answers are according to > the current behaviour of wave.google.com. These are not always the best > answers are open for debate. > > >> >> 1) >> >> What are the rules for total blip count? > > > Counts all the blips in the subtree from the anchor. > > >> I would assume we only want >> to count the blips that will be visible. There seems to be blips in >> the conversation thread that might not be visible. >> >> Threads shouldn't be invisible. The only time they are hidden is where > there are no blips inside. > > > >> 2) >> >> Right now I can only ask the conversation thread for an iterator of >> the blips. There doesn't seem to be a convenient way to get the count >> of blips, short of calling getBlips() and iterating through them. >> This could be added. >> > > The best way is to add a more efficient mechanism. One way I can think of > is to add a counter on the thread that counts the total number of children > (including descendants) in its subtree. This means every time you add or > remove a blip, you'd need to up date those numbers for every thread all the > way to the root. > > >> >> 3) >> >> I assume I can use the SupplementImpl class to see if a Blip is read >> or not during rendering. >> >> 4) >> >> I know that I COULD respond to the edit actions like continuation and >> delete to trigger and update of the count, however this would be the >> wrong approach because it wouldn't handle when some one else is >> adding / removing blips. To this point I haven't seen how to observe >> state changes in the conversation model and trigger rendering events. >> I.e. how do I notice another user has added a blip in some other >> browser so I can trigger calling my Dom Impl class to update the count >> in my browser. >> >> I just haven't been introduced to this event mechanism yet. >> > > The best is to listen on blip add and remove events rather than editing > session. > To add, the add and remove events covers both local and remote operations. > > >> >> >> Thanks in advance. >> >> ~Michael >> > > > > -- > David Wang > -- David Wang -- You received this message because you are subscribed to the Google Groups "Wave Protocol" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/wave-protocol?hl=en.
