Fix issue with date header ID generation.
We render based on the date received, but were generating the ID with the date sent. This caused the potential for a weird caching bug that could cause us to render the wrong date.
This commit is contained in:
parent
199fb517b1
commit
b58cede072
1 changed files with 2 additions and 4 deletions
|
@ -16,7 +16,6 @@
|
|||
*/
|
||||
package org.thoughtcrime.securesms.conversation;
|
||||
|
||||
import android.animation.ValueAnimator;
|
||||
import android.annotation.SuppressLint;
|
||||
import android.content.Context;
|
||||
import android.view.LayoutInflater;
|
||||
|
@ -69,7 +68,6 @@ import java.security.MessageDigest;
|
|||
import java.security.NoSuchAlgorithmException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Calendar;
|
||||
import java.util.Date;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
|
@ -347,8 +345,8 @@ public class ConversationAdapter
|
|||
|
||||
if (conversationMessage == null) return -1;
|
||||
|
||||
calendar.setTime(new Date(conversationMessage.getMessageRecord().getDateSent()));
|
||||
return Util.hashCode(calendar.get(Calendar.YEAR), calendar.get(Calendar.DAY_OF_YEAR));
|
||||
calendar.setTimeInMillis(conversationMessage.getMessageRecord().getDateReceived());
|
||||
return calendar.get(Calendar.YEAR) * 1000L + calendar.get(Calendar.DAY_OF_YEAR);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Add table
Reference in a new issue