1
0
mirror of https://github.com/moparisthebest/k-9 synced 2024-10-31 15:45:08 -04:00

Fix crash when deleting all messages in a thread

Fixes issue 4772
This commit is contained in:
cketti 2012-12-18 21:12:40 +01:00
parent 99e7d5a692
commit 3f84bb54f2

View File

@ -2979,13 +2979,16 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
} }
if (mIsThreadDisplay) { if (mIsThreadDisplay) {
cursor.moveToFirst(); if (cursor.moveToFirst()) {
mTitle = cursor.getString(SUBJECT_COLUMN); mTitle = cursor.getString(SUBJECT_COLUMN);
mTitle = Utility.stripSubject(mTitle); mTitle = Utility.stripSubject(mTitle);
if (StringUtils.isNullOrEmpty(mTitle)) { if (StringUtils.isNullOrEmpty(mTitle)) {
mTitle = getString(R.string.general_no_subject); mTitle = getString(R.string.general_no_subject);
} }
refreshTitle(); refreshTitle();
} else {
//TODO: empty thread view -> return to full message list
}
} }
cleanupSelected(cursor); cleanupSelected(cursor);