mirror of
https://github.com/oxen-io/session-android.git
synced 2025-04-16 22:01:26 +00:00
Extract "Today" in device list item to string resource
Related to #4752 Closes #4780 // FREEBIE
This commit is contained in:
parent
d0a65f86f5
commit
afb21203b7
@ -208,6 +208,7 @@
|
|||||||
<string name="DeviceListItem_unnamed_device">Unnamed device</string>
|
<string name="DeviceListItem_unnamed_device">Unnamed device</string>
|
||||||
<string name="DeviceListItem_linked_s">Linked %s</string>
|
<string name="DeviceListItem_linked_s">Linked %s</string>
|
||||||
<string name="DeviceListItem_last_active_s">Last active %s</string>
|
<string name="DeviceListItem_last_active_s">Last active %s</string>
|
||||||
|
<string name="DeviceListItem_today">Today</string>
|
||||||
|
|
||||||
<!-- ShareActivity -->
|
<!-- ShareActivity -->
|
||||||
<string name="ShareActivity_share_with">Share with</string>
|
<string name="ShareActivity_share_with">Share with</string>
|
||||||
|
@ -87,7 +87,7 @@ public class DateUtils extends android.text.format.DateUtils {
|
|||||||
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
|
SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyyMMdd");
|
||||||
|
|
||||||
if (simpleDateFormat.format(System.currentTimeMillis()).equals(simpleDateFormat.format(timestamp))) {
|
if (simpleDateFormat.format(System.currentTimeMillis()).equals(simpleDateFormat.format(timestamp))) {
|
||||||
return "Today";
|
return context.getString(R.string.DeviceListItem_today);
|
||||||
} else {
|
} else {
|
||||||
String format;
|
String format;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user