Merge remote-tracking branch 'origin/master'

pull/1282/head
gedoor 3 years ago
commit afb2085be3
  1. 3
      app/src/main/java/io/legado/app/help/http/cronet/CronetLoader.kt
  2. 2
      app/src/main/java/io/legado/app/model/localBook/UmdFile.kt
  3. 7
      app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterGrid.kt
  4. 6
      app/src/main/java/io/legado/app/ui/main/bookshelf/style2/BooksAdapterList.kt

@ -50,7 +50,8 @@ object CronetLoader : CronetEngine.Builder.LibraryLoader() {
fun install(): Boolean {
if (AppConfig.isGooglePlay) {
return true
//检查GMS的Cronet服务是否安装
return CronetProviderInstaller.isInstalled()
}
if (md5.length != 32 || !soFile.exists() || md5 != getFileMD5(soFile)) {
return false

@ -129,7 +129,7 @@ class UmdFile(var book: Book) {
return chapterList
}
private fun getImage(href: String): InputStream? {
private fun getImage(@Suppress("UNUSED_PARAMETER") href: String): InputStream? {
return null
}

@ -52,7 +52,12 @@ class BooksAdapterGrid(context: Context, callBack: CallBack) :
}
}
private fun onBindGroup(binding: ItemBookshelfGridGroupBinding, position: Int, bundle: Bundle) {
private fun onBindGroup(
binding: ItemBookshelfGridGroupBinding,
position: Int,
@Suppress("UNUSED_PARAMETER") bundle: Bundle
) {
binding.run {
val item = callBack.getItem(position) as BookGroup
tvName.text = item.groupName

@ -51,7 +51,11 @@ class BooksAdapterList(context: Context, callBack: CallBack) :
}
}
private fun onBindGroup(binding: ItemBookshelfListGroupBinding, position: Int, bundle: Bundle) {
private fun onBindGroup(
binding: ItemBookshelfListGroupBinding,
position: Int,
@Suppress("UNUSED_PARAMETER") bundle: Bundle
) {
binding.run {
val item = callBack.getItem(position) as BookGroup
tvName.text = item.groupName

Loading…
Cancel
Save