refactor: remove cn.hutool:hutool-crypto

for Digest/AES/DES/3DES use `io.legado.app.utils`
for dateformat use `java.text.SimpleDateFormat`
pull/1902/head
Xwite 3 years ago
parent 9be7857763
commit 620bd6a749
  1. 2
      app/build.gradle
  2. 5
      app/src/main/java/io/legado/app/ui/book/remote/RemoteBookAdapter.kt

@ -249,7 +249,7 @@ dependencies {
implementation('com.github.liuyueyi.quick-chinese-transfer:quick-transfer-core:0.2.3') 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 //renderscriptToolkit
implementation('com.github.android:renderscript-intrinsics-replacement-toolkit:b6363490c3') implementation('com.github.android:renderscript-intrinsics-replacement-toolkit:b6363490c3')

@ -2,11 +2,12 @@ package io.legado.app.ui.book.remote
import android.content.Context import android.content.Context
import android.view.ViewGroup import android.view.ViewGroup
import cn.hutool.core.date.LocalDateTimeUtil
import io.legado.app.base.adapter.ItemViewHolder import io.legado.app.base.adapter.ItemViewHolder
import io.legado.app.base.adapter.RecyclerAdapter import io.legado.app.base.adapter.RecyclerAdapter
import io.legado.app.databinding.ItemRemoteBookBinding import io.legado.app.databinding.ItemRemoteBookBinding
import io.legado.app.utils.ConvertUtils 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(".") tvName.text = item.filename.substringBeforeLast(".")
tvContentType.text = item.contentType tvContentType.text = item.contentType
tvSize.text = ConvertUtils.formatFileSize(item.size) 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))
} }
} }

Loading…
Cancel
Save