pull/35/head
kunfei 5 years ago
parent 473fce1e26
commit ac537b312c
  1. 7
      app/src/main/java/io/legado/app/ui/book/source/manage/BookSourceActivity.kt
  2. 7
      app/src/main/java/io/legado/app/utils/ACache.java

@ -1,5 +1,6 @@
package io.legado.app.ui.book.source.manage
import android.annotation.SuppressLint
import android.content.Intent
import android.os.Bundle
import android.view.Menu
@ -29,6 +30,7 @@ import io.legado.app.lib.theme.view.ATEAutoCompleteTextView
import io.legado.app.service.CheckSourceService
import io.legado.app.ui.book.source.edit.SourceEditActivity
import io.legado.app.ui.qrcode.QrCodeActivity
import io.legado.app.utils.ACache
import io.legado.app.utils.applyTint
import io.legado.app.utils.getViewModel
import io.legado.app.utils.splitNotBlank
@ -161,12 +163,17 @@ class BookSourceActivity : VMBaseActivity<BookSourceViewModel>(R.layout.activity
}
}
@SuppressLint("InflateParams")
private fun showImportDialog() {
val cacheUrls = ACache.get(this, "cacheUrls")
alert(titleResource = R.string.import_book_source_on_line) {
var editText: ATEAutoCompleteTextView? = null
customView {
layoutInflater.inflate(R.layout.dialog_edit_text, null).apply {
editText = edit_view
edit_view.setFilterValues("") {
}
}
}
okButton {

@ -514,7 +514,7 @@ public class ACache {
/**
* @author 杨福海michael www.yangfuhai.com
* @version 1.0
* @title 时间计算工具类
* title 时间计算工具类
*/
private static class Utils {
@ -685,7 +685,7 @@ public class ACache {
/**
* @author 杨福海michael www.yangfuhai.com
* @version 1.0
* @title 缓存管理器
* title 缓存管理器
*/
public class ACacheManager {
private final AtomicLong cacheSize;
@ -758,7 +758,6 @@ public class ACache {
} catch (Exception e) {
e.printStackTrace();
}
}
private File get(String key) {
@ -834,8 +833,6 @@ public class ACache {
e.printStackTrace();
return 0;
}
}
private long calculateSize(File file) {

Loading…
Cancel
Save