From 620bd6a7492b2e636955894b3a43b221b27ab42f Mon Sep 17 00:00:00 2001 From: Xwite <1797350009@qq.com> Date: Mon, 23 May 2022 23:44:46 +0800 Subject: [PATCH] refactor: remove cn.hutool:hutool-crypto for Digest/AES/DES/3DES use `io.legado.app.utils` for dateformat use `java.text.SimpleDateFormat` --- app/build.gradle | 2 +- .../java/io/legado/app/ui/book/remote/RemoteBookAdapter.kt | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index 7820fa23c..5594dc4ff 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -249,7 +249,7 @@ dependencies { implementation('com.github.liuyueyi.quick-chinese-transfer:quick-transfer-core:0.2.3') //加解密类库 - implementation('cn.hutool:hutool-crypto:5.8.1') + //implementation('cn.hutool:hutool-crypto:5.8.1') //renderscriptToolkit implementation('com.github.android:renderscript-intrinsics-replacement-toolkit:b6363490c3') diff --git a/app/src/main/java/io/legado/app/ui/book/remote/RemoteBookAdapter.kt b/app/src/main/java/io/legado/app/ui/book/remote/RemoteBookAdapter.kt index 36dd38f86..3836cdb3d 100644 --- a/app/src/main/java/io/legado/app/ui/book/remote/RemoteBookAdapter.kt +++ b/app/src/main/java/io/legado/app/ui/book/remote/RemoteBookAdapter.kt @@ -2,11 +2,12 @@ package io.legado.app.ui.book.remote import android.content.Context import android.view.ViewGroup -import cn.hutool.core.date.LocalDateTimeUtil import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.databinding.ItemRemoteBookBinding import io.legado.app.utils.ConvertUtils +import java.text.SimpleDateFormat +import java.util.Date /** @@ -38,7 +39,7 @@ class RemoteBookAdapter (context: Context, val callBack: CallBack) : tvName.text = item.filename.substringBeforeLast(".") tvContentType.text = item.contentType tvSize.text = ConvertUtils.formatFileSize(item.size) - tvDate.text = LocalDateTimeUtil.format(LocalDateTimeUtil.of(item.lastModify), "yyyy-MM-dd") + tvDate.text = SimpleDateFormat("yyyy-MM-dd").format(Date(item.lastModify)) } }