Fix crash when refreshing magic mailboxes.

bug 2929867

Change-Id: I95c4f4e31c1db2139c96b623f9b9c2df7916e5e1
This commit is contained in:
Makoto Onuki 2010-08-18 15:39:55 -07:00
parent f52afae942
commit 5e06d1714d
1 changed files with 7 additions and 2 deletions

View File

@ -582,8 +582,13 @@ public class MessageListXL extends Activity implements View.OnClickListener,
private void onRefresh() {
// Temporary implementation
if (mFragmentManager.isMailboxSelected()) {
mRefreshManager.refreshMessageList(mFragmentManager.getAccountId(),
mFragmentManager.getMailboxId());
long mailboxId = mFragmentManager.getMailboxId();
// TODO This class here shouldn't really know what can be refreshable.
// (The test below is only to prevent a crash... It's not enough. e.g. no refresh
// for outboxes.)
if (mailboxId >= 0) {
mRefreshManager.refreshMessageList(mFragmentManager.getAccountId(), mailboxId);
}
}
// TODO implement this