combined nested if statements in MessageList.removeMessages()

This commit is contained in:
András Veres-Szentkirályi 2012-07-06 14:21:24 +02:00
parent e3853824db
commit dd5ab2c2c6

View file

@ -362,13 +362,13 @@ public class MessageList
@Override
public void run() {
for (MessageInfoHolder message : messages) {
if (message != null) {
if (mFolderName == null || (message.folder != null && message.folder.name.equals(mFolderName))) {
if (message.selected && mSelectedCount > 0) {
mSelectedCount--;
}
mAdapter.messages.remove(message);
if (message != null && (mFolderName == null || (
message.folder != null &&
message.folder.name.equals(mFolderName)))) {
if (message.selected && mSelectedCount > 0) {
mSelectedCount--;
}
mAdapter.messages.remove(message);
}
}
resetUnreadCountOnThread();