This commit is contained in:
Grishka 2022-05-13 19:20:40 +03:00
parent a8407571a4
commit 95c66654aa
2 changed files with 4 additions and 1 deletions

View File

@ -107,7 +107,9 @@ public class UiUtils{
long t=instant.toEpochMilli(); long t=instant.toEpochMilli();
long now=System.currentTimeMillis(); long now=System.currentTimeMillis();
long diff=now-t; long diff=now-t;
if(diff<60_000L){ if(diff<1000L){
return context.getString(R.string.time_now);
}else if(diff<60_000L){
return context.getString(R.string.time_seconds, diff/1000L); return context.getString(R.string.time_seconds, diff/1000L);
}else if(diff<3600_000L){ }else if(diff<3600_000L){
return context.getString(R.string.time_minutes, diff/60_000L); return context.getString(R.string.time_minutes, diff/60_000L);

View File

@ -339,4 +339,5 @@
<item quantity="other">%,d reblogs</item> <item quantity="other">%,d reblogs</item>
</plurals> </plurals>
<string name="timestamp_via_app">%1$s via %2$s</string> <string name="timestamp_via_app">%1$s via %2$s</string>
<string name="time_now">now</string>
</resources> </resources>