Refactor group database model and flow.

1) Use existing DB types instead of adding new columns.

2) Store group attributes in message body, like everything else.
This commit is contained in:
Moxie Marlinspike
2014-02-19 21:06:54 -08:00
parent 0cdc6fd87d
commit 9614dc9055
28 changed files with 432 additions and 381 deletions

View File

@@ -123,8 +123,9 @@ public class ConversationAdapter extends CursorAdapter implements AbsListView.Re
long id = cursor.getLong(cursor.getColumnIndexOrThrow(MmsSmsColumns.ID));
String type = cursor.getString(cursor.getColumnIndexOrThrow(MmsSmsDatabase.TRANSPORT));
MessageRecord messageRecord = getMessageRecord(id, cursor, type);
if (GroupUtil.isMetaGroupAction(messageRecord.getGroupAction())) return MESSAGE_TYPE_GROUP_ACTION;
if (messageRecord.isOutgoing()) return MESSAGE_TYPE_OUTGOING;
if (messageRecord.isGroupAction()) return MESSAGE_TYPE_GROUP_ACTION;
else if (messageRecord.isOutgoing()) return MESSAGE_TYPE_OUTGOING;
else return MESSAGE_TYPE_INCOMING;
}