mirror of
https://github.com/oxen-io/session-android.git
synced 2025-12-04 17:21:59 +00:00
Better UX handling on identity key mismatches.
1) Migrate from GSON to Jackson everywhere. 2) Add support for storing identity key conflicts on message rows. 3) Add limited support for surfacing identity key conflicts in UI.
This commit is contained in:
@@ -17,6 +17,10 @@
|
||||
package org.thoughtcrime.securesms.util;
|
||||
|
||||
import android.content.Context;
|
||||
import android.text.format.DateFormat;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Locale;
|
||||
|
||||
import org.thoughtcrime.securesms.R;
|
||||
|
||||
@@ -71,4 +75,17 @@ public class DateUtils extends android.text.format.DateUtils {
|
||||
return DateUtils.formatDateTime(c, timestamp, formatFlags);
|
||||
}
|
||||
}
|
||||
|
||||
public static SimpleDateFormat getDetailedDateFormatter(Context context) {
|
||||
String dateFormatPattern;
|
||||
|
||||
if (DateFormat.is24HourFormat(context)) {
|
||||
dateFormatPattern = "MMM d, yyyy HH:mm:ss zzz";
|
||||
} else {
|
||||
dateFormatPattern = "MMM d, yyyy hh:mm:ssa zzz";
|
||||
}
|
||||
|
||||
return new SimpleDateFormat(dateFormatPattern, Locale.getDefault());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user