|
|
|
@ -53,11 +53,11 @@ class ImportBookAdapter(context: Context, val callBack: CallBack) : |
|
|
|
|
tvTag.text = item.name.substringAfterLast(".") |
|
|
|
|
tvSize.text = StringUtils.toSize(item.size) |
|
|
|
|
tvDate.text = AppConst.dateFormat.format(item.date) |
|
|
|
|
cbSelect.isChecked = selectedUris.contains(item.uri.toString()) |
|
|
|
|
cbSelect.isChecked = selectedUris.contains(item.toString()) |
|
|
|
|
} |
|
|
|
|
tvName.text = item.name |
|
|
|
|
} else { |
|
|
|
|
cbSelect.isChecked = selectedUris.contains(item.uri.toString()) |
|
|
|
|
cbSelect.isChecked = selectedUris.contains(item.toString()) |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -68,10 +68,10 @@ class ImportBookAdapter(context: Context, val callBack: CallBack) : |
|
|
|
|
if (it.isDir) { |
|
|
|
|
callBack.nextDoc(it.uri) |
|
|
|
|
} else if (!bookFileNames.contains(it.name)) { |
|
|
|
|
if (!selectedUris.contains(it.uri.toString())) { |
|
|
|
|
selectedUris.add(it.uri.toString()) |
|
|
|
|
if (!selectedUris.contains(it.toString())) { |
|
|
|
|
selectedUris.add(it.toString()) |
|
|
|
|
} else { |
|
|
|
|
selectedUris.remove(it.uri.toString()) |
|
|
|
|
selectedUris.remove(it.toString()) |
|
|
|
|
} |
|
|
|
|
notifyItemChanged(holder.layoutPosition, true) |
|
|
|
|
callBack.upCountView() |
|
|
|
|