mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-18 05:57:44 +00:00
Change DateUtils string 'Now' to 'Just now'
Changes the DateUtils string 'Now' to 'Just now' which is a better fit imho. Used for messages in the conversation view that e. g. just have been received. // FREEBIE Closes #5761
This commit is contained in:
parent
ed8215de81
commit
43e1d452c7
@ -222,7 +222,7 @@
|
|||||||
<string name="CustomDefaultPreference_none">None</string>
|
<string name="CustomDefaultPreference_none">None</string>
|
||||||
|
|
||||||
<!-- DateUtils -->
|
<!-- DateUtils -->
|
||||||
<string name="DateUtils_now">Now</string>
|
<string name="DateUtils_just_now">Just now</string>
|
||||||
<string name="DateUtils_minutes_ago">%d min</string>
|
<string name="DateUtils_minutes_ago">%d min</string>
|
||||||
|
|
||||||
<!-- DeviceListActivity -->
|
<!-- DeviceListActivity -->
|
||||||
|
@ -48,7 +48,7 @@ public class DateUtils extends android.text.format.DateUtils {
|
|||||||
|
|
||||||
public static String getBriefRelativeTimeSpanString(final Context c, final Locale locale, final long timestamp) {
|
public static String getBriefRelativeTimeSpanString(final Context c, final Locale locale, final long timestamp) {
|
||||||
if (isWithin(timestamp, 1, TimeUnit.MINUTES)) {
|
if (isWithin(timestamp, 1, TimeUnit.MINUTES)) {
|
||||||
return c.getString(R.string.DateUtils_now);
|
return c.getString(R.string.DateUtils_just_now);
|
||||||
} else if (isWithin(timestamp, 1, TimeUnit.HOURS)) {
|
} else if (isWithin(timestamp, 1, TimeUnit.HOURS)) {
|
||||||
int mins = convertDelta(timestamp, TimeUnit.MINUTES);
|
int mins = convertDelta(timestamp, TimeUnit.MINUTES);
|
||||||
return c.getResources().getString(R.string.DateUtils_minutes_ago, mins);
|
return c.getResources().getString(R.string.DateUtils_minutes_ago, mins);
|
||||||
@ -66,7 +66,7 @@ public class DateUtils extends android.text.format.DateUtils {
|
|||||||
|
|
||||||
public static String getExtendedRelativeTimeSpanString(final Context c, final Locale locale, final long timestamp) {
|
public static String getExtendedRelativeTimeSpanString(final Context c, final Locale locale, final long timestamp) {
|
||||||
if (isWithin(timestamp, 1, TimeUnit.MINUTES)) {
|
if (isWithin(timestamp, 1, TimeUnit.MINUTES)) {
|
||||||
return c.getString(R.string.DateUtils_now);
|
return c.getString(R.string.DateUtils_just_now);
|
||||||
} else if (isWithin(timestamp, 1, TimeUnit.HOURS)) {
|
} else if (isWithin(timestamp, 1, TimeUnit.HOURS)) {
|
||||||
int mins = (int)TimeUnit.MINUTES.convert(System.currentTimeMillis() - timestamp, TimeUnit.MILLISECONDS);
|
int mins = (int)TimeUnit.MINUTES.convert(System.currentTimeMillis() - timestamp, TimeUnit.MILLISECONDS);
|
||||||
return c.getResources().getString(R.string.DateUtils_minutes_ago, mins);
|
return c.getResources().getString(R.string.DateUtils_minutes_ago, mins);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user