When loading messages, use left join for Message and Body.
Existing inner join means that a Message without an entry in Body table cannot display correctly, even though this is a potentially legitimate state. However, because the MessageCursor for Email doesn't read flagLoaded at all, this change actually causes another bug: if you go to a partially loaded message, it will show as blank with no load indicator. Fixing b/8370633 will mask this by not letting you get in a situation where partially loaded messages are shown. Bug: 8512030 Change-Id: Ie2e365e7e5df3959115ed299d1a7f03aa1d7af79
This commit is contained in:
parent
3bef153c9c
commit
46d6a4a7cb
|
@ -2513,8 +2513,8 @@ outer:
|
|||
}
|
||||
}
|
||||
StringBuilder sb = genSelect(getMessageViewMap(), uiProjection, values);
|
||||
sb.append(" FROM " + Message.TABLE_NAME + "," + Body.TABLE_NAME + " WHERE " +
|
||||
Body.MESSAGE_KEY + "=" + Message.TABLE_NAME + "." + Message.RECORD_ID + " AND " +
|
||||
sb.append(" FROM " + Message.TABLE_NAME + " LEFT JOIN " + Body.TABLE_NAME + " ON " +
|
||||
Body.MESSAGE_KEY + "=" + Message.TABLE_NAME + "." + Message.RECORD_ID + " WHERE " +
|
||||
Message.TABLE_NAME + "." + Message.RECORD_ID + "=?");
|
||||
String sql = sb.toString();
|
||||
return new MessageQuery(sql, attachmentJson);
|
||||
|
|
Loading…
Reference in New Issue