Examples of ConversationThread


Examples of org.waveprotocol.wave.model.conversation.ConversationThread

   * This test verifies that blips counts are aggregated properly when a blip is
   * deleted which contains an inline thread.
   */
  public void testNestedThreadDeleteBlip() throws Exception {
    ConversationBlip rb1 = rootThread.appendBlip();
    ConversationThread t1 = rb1.addReplyThread(0);
    t1.appendBlip();
    t1.appendBlip();

    ConversationBlip rb2 = rootThread.appendBlip();
    ConversationThread t2 = rb2.addReplyThread(0);
    t2.appendBlip();
    ConversationBlip t2b2 = t2.appendBlip();

    ConversationThread t3 = t2b2.addReplyThread();
    t3.appendBlip();

    t2b2.delete();

    assertEquals(2, monitor.getTotalCount(t1));
    assertEquals(1, monitor.getTotalCount(t2));
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

   * This test verifies the read and unread state in both the root thread as
   * well as an inline thread.
   */
  public void testNestedThreadReading() throws Exception {
    ConversationBlip rb1 = rootThread.appendBlip();
    ConversationThread t1 = rb1.addReplyThread(0);
    t1.appendBlip();
    t1.appendBlip();

    ConversationBlip rb2 = rootThread.appendBlip();
    ConversationThread t2 = rb2.addReplyThread(0);
    t2.appendBlip();
    ConversationBlip t2b2 = t2.appendBlip();

    ConversationThread t3 = t2b2.addReplyThread();
    ConversationBlip t3b1 = t3.appendBlip();

    supplementedWave.markAsRead(t3b1);

    assertEquals(0, monitor.getReadCount(t1));
    assertEquals(2, monitor.getUnreadCount(t1));
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

   * This test verifies the read and unread state when a thread with read and
   * unread blips is deleted.
   */
  public void testNestedThreadWithDeleteReading() throws Exception {
    ConversationBlip rb1 = rootThread.appendBlip();
    ConversationThread t1 = rb1.addReplyThread(0);
    t1.appendBlip();
    ConversationBlip t1b2 = t1.appendBlip();

    ConversationBlip rb2 = rootThread.appendBlip();
    ConversationThread t2 = rb2.addReplyThread(0);
    t2.appendBlip();
    ConversationBlip t2b2 = t2.appendBlip();

    ConversationThread t3 = t2b2.addReplyThread();
    t3.appendBlip();
    ConversationBlip t3b1 = t3.appendBlip();

    supplementedWave.markAsRead(t3b1);
    supplementedWave.markAsRead(t1b2);
    t2b2.delete();

View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

    public void onThreadAdded(ObservableConversationThread thread) {
      ObservableConversationBlip parentBlip = thread.getParentBlip();
      BlipView blipView = views.getBlipView(parentBlip);

      if (blipView != null) {
        ConversationThread next = findBefore(thread, parentBlip.getReplyThreads());
        replyHandler.presentAfter(blipView, next, thread);
      } else {
        throw new IllegalStateException("blipView not present");
      }
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

      }
    }

    @Override
    public void onBlipAdded(ObservableConversationBlip blip) {
      ConversationThread parentThread = blip.getThread();
      ThreadView threadView = viewOf(parentThread);
      if (threadView != null) {
        ConversationBlip ref = findBefore(blip, parentThread.getBlips());
        BlipView refView = viewOf(ref);

        // Render the new blip.
        threadView.insertBlipAfter(refView, blip);
        bubbleBlipCountUpdate(blip);
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

      }
      bubbleBlipCountUpdate(blip);
    }

    private void bubbleBlipCountUpdate(ConversationBlip blip) {
      ConversationThread thread = blip.getThread();
      ThreadView threadUi = viewOf(thread);
      threadUi.setTotalBlipCount(readMonitor.getTotalCount(thread));
      ConversationBlip parentBlip = thread.getParentBlip();
      if (parentBlip != null) {
        bubbleBlipCountUpdate(parentBlip);
      }
    }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

    if (metaUi != null) {
      AnchorView inlineUi = dood.getAnchor();
      metaUi.insertInlineAnchorBefore(ref != null ? ref.getAnchor() : null, inlineUi);

      // Move reply if it exists.
      ConversationThread reply = blip.getReplyThread(dood.getId());
      AnchorView defaultUi = reply != null ? views.getDefaultAnchor(reply) : null;
      InlineThreadView replyUi = defaultUi != null ? defaultUi.getThread() : null;
      if (replyUi != null) {
        defaultUi.detach(replyUi);
        inlineUi.attach(replyUi);
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

    BlipMetaView metaUi = blip != null ? blipUi.getMeta() : null;
    if (metaUi != null) {
      AnchorView inlineUi = dood.getAnchor();

      // Move reply if there is one.
      ConversationThread reply = blip.getReplyThread(dood.getId());
      AnchorView defaultUi = reply != null ? views.getDefaultAnchor(reply) : null;
      InlineThreadView replyUi = inlineUi.getThread();
      if (replyUi != null) {
        inlineUi.detach(replyUi);
        defaultUi.attach(replyUi);
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

    focusAndEdit(views.getBlipView(reply));
  }

  @Override
  public void addContinuation(ThreadView threadUi) {
    ConversationThread thread = views.getThread(threadUi);
    ConversationBlip continuation = thread.appendBlip();
    blipQueue.flush();
    focusAndEdit(views.getBlipView(continuation));
  }
View Full Code Here

Examples of org.waveprotocol.wave.model.conversation.ConversationThread

    return views.blipUis.inverse().get(blipUi);
  }

  @Override
  public ConversationThread getThread(ThreadView threadUi) {
    ConversationThread inline = views.inlineThreadUis.inverse().get(threadUi);
    return inline != null ? inline : views.rootThreadUis.inverse().get(threadUi);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.