parent
f6951b9ae0
commit
c8571d7bc7
2 changed files with 4 additions and 4 deletions
|
@ -655,10 +655,10 @@ public class ConversationItem extends LinearLayout
|
||||||
if (sharedContactStub.resolved()) sharedContactStub.get().getFooter().setVisibility(GONE);
|
if (sharedContactStub.resolved()) sharedContactStub.get().getFooter().setVisibility(GONE);
|
||||||
if (mediaThumbnailStub.resolved()) mediaThumbnailStub.get().getFooter().setVisibility(GONE);
|
if (mediaThumbnailStub.resolved()) mediaThumbnailStub.get().getFooter().setVisibility(GONE);
|
||||||
|
|
||||||
boolean differentMinutes = next.isPresent() && !DateUtils.isSameBriefRelativeTimestamp(context, locale, next.get().getTimestamp(), current.getTimestamp());
|
boolean differentTimestamps = next.isPresent() && !DateUtils.isSameExtendedRelativeTimestamp(context, locale, next.get().getTimestamp(), current.getTimestamp());
|
||||||
|
|
||||||
if (current.getExpiresIn() > 0 || !current.isSecure() || current.isPending() || current.isPendingInsecureSmsFallback() ||
|
if (current.getExpiresIn() > 0 || !current.isSecure() || current.isPending() || current.isPendingInsecureSmsFallback() ||
|
||||||
current.isFailed() || differentMinutes || isEndOfMessageCluster(current, next, isGroupThread))
|
current.isFailed() || differentTimestamps || isEndOfMessageCluster(current, next, isGroupThread))
|
||||||
{
|
{
|
||||||
ConversationItemFooter activeFooter = getActiveFooter(current);
|
ConversationItemFooter activeFooter = getActiveFooter(current);
|
||||||
activeFooter.setVisibility(VISIBLE);
|
activeFooter.setVisibility(VISIBLE);
|
||||||
|
|
|
@ -136,8 +136,8 @@ public class DateUtils extends android.text.format.DateUtils {
|
||||||
return DATE_FORMAT.format(new Date(t1)).equals(DATE_FORMAT.format(new Date(t2)));
|
return DATE_FORMAT.format(new Date(t1)).equals(DATE_FORMAT.format(new Date(t2)));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isSameBriefRelativeTimestamp(@NonNull Context context, @NonNull Locale locale, long t1, long t2) {
|
public static boolean isSameExtendedRelativeTimestamp(@NonNull Context context, @NonNull Locale locale, long t1, long t2) {
|
||||||
return getBriefRelativeTimeSpanString(context, locale, t1).equals(getBriefRelativeTimeSpanString(context, locale, t2));
|
return getExtendedRelativeTimeSpanString(context, locale, t1).equals(getExtendedRelativeTimeSpanString(context, locale, t2));
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getLocalizedPattern(String template, Locale locale) {
|
private static String getLocalizedPattern(String template, Locale locale) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue