[1.0.11] fix(watch):
- WatchItemFragment: 增加对 latest/max/min 为 0 的判断 - 空值或零值统一显示 "--分钟",修复之前错误显示时间转换结果的问题 - 更新首页头部图标资源 icon_home_head.png
This commit is contained in:
@@ -129,23 +129,23 @@ class WatchItemFragment :
|
||||
mBinding.watchLeftValue.text = "--"
|
||||
mBinding.watchRightValue.text = "--"
|
||||
} else {
|
||||
if (TextUtils.isEmpty(bean.latest)) {
|
||||
mBinding.watchValue.text = "--"
|
||||
if (TextUtils.isEmpty(bean.latest)||bean.latest.floatToInt()==0) {
|
||||
mBinding.watchValue.text = "--分钟"
|
||||
} else {
|
||||
mBinding.watchValue.text =
|
||||
DateUtil.timeDiff(bean.latest!!.floatToInt().toLong() * 1000 * 60)
|
||||
.orEmptyDefault()
|
||||
}
|
||||
if (TextUtils.isEmpty(bean.max)) {
|
||||
mBinding.watchLeftValue.text = "--"
|
||||
if (TextUtils.isEmpty(bean.max)||bean.max.floatToInt()==0) {
|
||||
mBinding.watchLeftValue.text = "--分钟"
|
||||
} else {
|
||||
mBinding.watchLeftValue.text =
|
||||
DateUtil.timeDiff(bean.max!!.floatToInt().toLong() * 1000 * 60)
|
||||
.orEmptyDefault()
|
||||
}
|
||||
|
||||
if (TextUtils.isEmpty(bean.min)) {
|
||||
mBinding.watchRightValue.text = "--"
|
||||
if (TextUtils.isEmpty(bean.min)||bean.min.floatToInt()==0) {
|
||||
mBinding.watchRightValue.text = "--分钟"
|
||||
} else {
|
||||
mBinding.watchRightValue.text =
|
||||
DateUtil.timeDiff(bean.min!!.floatToInt().toLong() * 1000 * 60)
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 83 KiB After Width: | Height: | Size: 86 KiB |
@@ -84,7 +84,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="24dp"
|
||||
android:layout_marginTop="10dp"
|
||||
android:layout_marginTop="6dp"
|
||||
android:ellipsize="end"
|
||||
android:textColor="@color/white"
|
||||
android:textSize="12sp"
|
||||
|
||||
+2
-2
@@ -2,8 +2,8 @@ ext {
|
||||
minSdkVersion = 26
|
||||
targetSdkVersion = 32
|
||||
compileSdkVersion = 33
|
||||
versionCode = 1010
|
||||
versionName = "1.0.10"
|
||||
versionCode = 1011
|
||||
versionName = "1.0.11"
|
||||
//Dependencies
|
||||
junitVersion = "4.12"
|
||||
lifecycleVersion = "2.6.0-alpha01"
|
||||
|
||||
Reference in New Issue
Block a user