Fix crash when deleting all messages in a thread
Fixes issue 4772
This commit is contained in:
parent
99e7d5a692
commit
3f84bb54f2
1 changed files with 9 additions and 6 deletions
|
@ -2979,13 +2979,16 @@ public class MessageListFragment extends SherlockFragment implements OnItemClick
|
|||
}
|
||||
|
||||
if (mIsThreadDisplay) {
|
||||
cursor.moveToFirst();
|
||||
mTitle = cursor.getString(SUBJECT_COLUMN);
|
||||
mTitle = Utility.stripSubject(mTitle);
|
||||
if (StringUtils.isNullOrEmpty(mTitle)) {
|
||||
mTitle = getString(R.string.general_no_subject);
|
||||
if (cursor.moveToFirst()) {
|
||||
mTitle = cursor.getString(SUBJECT_COLUMN);
|
||||
mTitle = Utility.stripSubject(mTitle);
|
||||
if (StringUtils.isNullOrEmpty(mTitle)) {
|
||||
mTitle = getString(R.string.general_no_subject);
|
||||
}
|
||||
refreshTitle();
|
||||
} else {
|
||||
//TODO: empty thread view -> return to full message list
|
||||
}
|
||||
refreshTitle();
|
||||
}
|
||||
|
||||
cleanupSelected(cursor);
|
||||
|
|
Loading…
Reference in a new issue