Adjust displayed times.
authorDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Apr 2011 04:29:54 +0000 (06:29 +0200)
committerDavid ‘Bombe’ Roden <bombe@pterodactylus.net>
Fri, 8 Apr 2011 04:29:54 +0000 (06:29 +0200)
src/main/java/net/pterodactylus/sone/web/ajax/GetTimesAjaxPage.java
src/main/resources/i18n/sone.en.properties

index 5711257..b17e4a2 100644 (file)
@@ -125,22 +125,22 @@ public class GetTimesAjaxPage extends JsonPage {
                if (age < 0) {
                        text = webInterface.getL10n().getDefaultString("View.Time.InTheFuture");
                        refresh = 5 * Time.MINUTE;
-               } else if (age < 30 * Time.SECOND) {
+               } else if (age < 20 * Time.SECOND) {
                        text = webInterface.getL10n().getDefaultString("View.Time.AFewSecondsAgo");
-                       refresh = 5 * Time.SECOND;
-               } else if (age < 1 * Time.MINUTE) {
-                       text = webInterface.getL10n().getString("View.Time.XSecondsAgo", "sec", String.valueOf((int) Digits.round(age / Time.SECOND, 10)));
                        refresh = 10 * Time.SECOND;
-               } else if (age < 2 * Time.MINUTE) {
+               } else if (age < 45 * Time.SECOND) {
+                       text = webInterface.getL10n().getString("View.Time.HalfAMinuteAgo");
+                       refresh = 20 * Time.SECOND;
+               } else if (age < 90 * Time.SECOND) {
                        text = webInterface.getL10n().getString("View.Time.AMinuteAgo");
                        refresh = Time.MINUTE;
                } else if (age < 30 * Time.MINUTE) {
                        text = webInterface.getL10n().getString("View.Time.XMinutesAgo", "min", String.valueOf((int) Digits.round(age / Time.MINUTE, 1)));
-                       refresh = Time.MINUTE;
+                       refresh = 1 * Time.MINUTE;
                } else if (age < 45 * Time.MINUTE) {
                        text = webInterface.getL10n().getString("View.Time.HalfAnHourAgo");
                        refresh = 10 * Time.MINUTE;
-               } else if (age < 2 * Time.HOUR) {
+               } else if (age < 90 * Time.MINUTE) {
                        text = webInterface.getL10n().getString("View.Time.AnHourAgo");
                        refresh = Time.HOUR;
                } else if (age < 21 * Time.HOUR) {
index bdf3e72..cfdb100 100644 (file)
@@ -241,7 +241,7 @@ View.Trust.Tooltip.Untrust=Remove your trust assignment for this person
 
 View.Time.InTheFuture=in the future
 View.Time.AFewSecondsAgo=a few seconds ago
-View.Time.XSecondsAgo=${sec} seconds ago
+View.Time.HalfAMinuteAgo=about half a minute ago
 View.Time.AMinuteAgo=about a minute ago
 View.Time.XMinutesAgo=${min} minutes ago
 View.Time.HalfAnHourAgo=half an hour ago