Skip to content

Commit

Permalink
optimize some logic
Browse files Browse the repository at this point in the history
  • Loading branch information
teble committed Apr 12, 2022
1 parent 7119874 commit f7c9155
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ android {
//noinspection OldTargetApi
targetSdkVersion 31
versionCode mVersionCode
versionName "3.0.1"
versionName "3.0.2"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ fun AppUpdateLayout(dialog: CustomDialog) {
) {
items(updateLog.size) { index ->
Text(
text = "${index + 1}. " + updateLog[index],
text = updateLog[index],
fontSize = 18.sp,
color = Color(0xFF424242),
modifier = Modifier.padding(horizontal = 8.dp)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ object TimeUtil {
val uc = url.openConnection() as HttpURLConnection
uc.connectTimeout = 2000
uc.connect()
uc.date
// 避免时间误差
uc.date + 500
} catch (e: Exception) {
LogUtil.e(e, "get network time error, will used localtime -> ${getCNTime()}:")
ToastUtil.send("获取网络时间失败,将使用本地时间执行任务,可能存在误差")
Expand Down

0 comments on commit f7c9155

Please sign in to comment.