Conversation
…ong pressing a conversation item
…id unique to each message but accessible to both sender and recipient. Class uses the simple, existing Base64 encoding method to create the hash. Also includes test for the Base64 mehtod.
…oming messages, and shows when only one message is selected at a time
… the emoji menu button on long press
…ced emoji drawer listener for emoji reactions #107
…droid into emojireactions
…emented new EmojiReactionDatabase, and updated MessageHashedId Defined a hashId value in the MmsSmsDatabase and subclasses, as well as in MessageRecord and subclasses. Created EmojiReactionDatabase to hold reaction items and keys to hashed column in Sms- and MmsDatabase. Updated MessagedHashId to take MessageRecord parameter instead of Address, as accessing one's own address as a sender is not straightforward. The hash will now be done with the message body and date sent timestamp instead, which will still produce a unique id for each message.
…ceived. Pair Programming @claudds
…hen an emoji is selected in the popup and call message sender
…ven the message hashed id.
…droid into emojireactions
…sation items. Attempted to set up the setting of the reactions in the db when reacting. Found where receiving incoming messages happens. Peer programmed with @claudds @samantha-kerr #88 #108
…database methods and initial hashing method. Peer programmed with @samantha-kerr @claudds #88 #108 #153
… for recieved emoji reactions. Pear programmed with @samantha-kerr @claudds #88 #108
…r testing purposed. #88
…on a timestamp to associate an emoji to a sent message
…arching for specific messages #153
…droid into emojireactions
…receiving emoji reaction #109
| contentValues.put(ADDRESS, message.getRecipient().getAddress().serialize()); | ||
| contentValues.put(DELIVERY_RECEIPT_COUNT, Stream.of(earlyDeliveryReceipts.values()).mapToLong(Long::longValue).sum()); | ||
| contentValues.put(READ_RECEIPT_COUNT, Stream.of(earlyReadReceipts.values()).mapToLong(Long::longValue).sum()); | ||
| contentValues.put(HASHED_ID, generateHashedId(message.getSentTimeMillis())); |
There was a problem hiding this comment.
What happens if you send a multi length message (160+ characters)? Will this still work based off of the sent time?
There was a problem hiding this comment.
Is a multi length message a message that gets auto sent as two+ bubbles?
There was a problem hiding this comment.
A message split shouldn't happen, messages are just cut off at 2000 characters.
|
|
||
| //check if the emoji drawer is closed & proper emoji is displayed | ||
| Expectations.checkIsNotDisplayed(R.id.emoji_drawer); | ||
| Expectations.checkIsDisplayed(R.id.emoji_reaction, "🏡"); |
There was a problem hiding this comment.
Can we test against the unicode string instead of an actual emoji? Seems kinda weird to push this to a repo.
There was a problem hiding this comment.
Tried to replace this with unicode text; however, the actual emoji animation is saved in the database as the "text" part of the view, thus espresso's matchers do not find any matches for unicode text
| SQLiteDatabase db = databaseHelper.getWritableDatabase(); | ||
| db.beginTransaction(); | ||
| try { | ||
| String hashedId = messageRecord.getHashedId(); |
There was a problem hiding this comment.
good usage of try/catch/finally!
| } | ||
|
|
||
| db.setTransactionSuccessful(); | ||
| }catch(Exception e){ |
There was a problem hiding this comment.
I would change catching exception e to catching the specific exceptions instead, to make it more clear what kind of exception these operations can throw/and to not squash other unexpected exceptions.
…eaction setter methods.
Messages can now be appended with an emoji reaction (both incoming and outgoing).
Messages are given a hashed id upon sending/receiving which consists of the hashed timestamp down to milliseconds. When an emoji reaction for a message is sent, this timestamp is appended to the message and it is associated to the proper message upon receipt.
closes: #88