示例#1
0
  @Override
  public void showMoreFromSameSender(String senderAddress) {
    LocalSearch tmpSearch = new LocalSearch("From " + senderAddress);
    tmpSearch.addAccountUuids(mSearch.getAccountUuids());
    tmpSearch.and(Searchfield.SENDER, senderAddress, Attribute.CONTAINS);

    MessageListFragment fragment = MessageListFragment.newInstance(tmpSearch, false, false);

    addMessageListFragment(fragment, true);
  }
示例#2
0
  @Override
  public void showThread(Account account, String folderName, long threadRootId) {
    showMessageViewPlaceHolder();

    LocalSearch tmpSearch = new LocalSearch();
    tmpSearch.addAccountUuid(account.getUuid());
    tmpSearch.and(Searchfield.THREAD_ID, String.valueOf(threadRootId), Attribute.EQUALS);

    MessageListFragment fragment = MessageListFragment.newInstance(tmpSearch, true, false);
    addMessageListFragment(fragment, true);
  }
示例#3
0
  /**
   * Create fragment instances if necessary.
   *
   * @see #findFragments()
   */
  private void initializeFragments() {
    FragmentManager fragmentManager = getSupportFragmentManager();
    fragmentManager.addOnBackStackChangedListener(this);

    boolean hasMessageListFragment = (mMessageListFragment != null);

    if (!hasMessageListFragment) {
      FragmentTransaction ft = fragmentManager.beginTransaction();
      mMessageListFragment =
          MessageListFragment.newInstance(
              mSearch, false, (K9.isThreadedViewEnabled() && !mNoThreading));
      ft.add(R.id.message_list_container, mMessageListFragment);
      ft.commit();
    }

    // Check if the fragment wasn't restarted and has a MessageReference in the arguments. If
    // so, open the referenced message.
    if (!hasMessageListFragment && mMessageViewFragment == null && mMessageReference != null) {
      openMessage(mMessageReference);
    }
  }