diff --git a/.idea/misc.xml b/.idea/misc.xml index bdcf934..d5ae2ac 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -80,7 +80,7 @@ - + diff --git a/app/build.gradle b/app/build.gradle index e5378b9..aae0326 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -15,7 +15,7 @@ android { applicationId "com.tommasoberlose.anotherwidget" minSdkVersion 19 targetSdkVersion 26 - versionCode 16 + versionCode 18 versionName "1.2" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" } diff --git a/app/release/output.json b/app/release/output.json index 4fc4267..ab592c5 100644 --- a/app/release/output.json +++ b/app/release/output.json @@ -1 +1 @@ -[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":16},"path":"app-release.apk","properties":{"packageId":"com.tommasoberlose.anotherwidget","split":"","minSdkVersion":"19"}}] \ No newline at end of file +[{"outputType":{"type":"APK"},"apkInfo":{"type":"MAIN","splits":[],"versionCode":18},"path":"app-release.apk","properties":{"packageId":"com.tommasoberlose.anotherwidget","split":"","minSdkVersion":"19"}}] \ No newline at end of file diff --git a/app/src/main/java/com/tommasoberlose/anotherwidget/util/Util.kt b/app/src/main/java/com/tommasoberlose/anotherwidget/util/Util.kt index 0d2c381..512fbcf 100644 --- a/app/src/main/java/com/tommasoberlose/anotherwidget/util/Util.kt +++ b/app/src/main/java/com/tommasoberlose/anotherwidget/util/Util.kt @@ -415,7 +415,7 @@ object Util { if (difference < 0) { return "" - } else if (difference < 1000 * 60) { + } else if (TimeUnit.MILLISECONDS.toHours(difference) < 1) { val minutes = TimeUnit.MILLISECONDS.toMinutes(difference) var time = "" if (minutes > 0) { @@ -423,7 +423,7 @@ object Util { } return String.format("%s %s", context.getString(R.string.in_code), time) - } else if (difference < 1000 * 60 * 6) { + } else if (TimeUnit.MILLISECONDS.toHours(difference) < 12) { val hour = TimeUnit.MILLISECONDS.toHours(difference) var time = "" if (hour > 0) {