Add links to local source guide

Also added empty view in browse sources to retry or open in webview
This commit is contained in:
Jay 2020-04-25 20:29:00 -04:00
parent 40ae78c0a3
commit 7b7222428c
41 changed files with 117 additions and 50 deletions

View file

@ -31,12 +31,14 @@ import java.util.zip.ZipFile
class LocalSource(private val context: Context) : CatalogueSource {
companion object {
private val COVER_NAME = "cover.jpg"
const val HELP_URL = "https://tachiyomi.org/help/guides/reading-local-manga/"
private const val COVER_NAME = "cover.jpg"
private val POPULAR_FILTERS = FilterList(OrderBy())
private val LATEST_FILTERS =
FilterList(OrderBy().apply { state = Filter.Sort.Selection(1, false) })
private val LATEST_THRESHOLD = TimeUnit.MILLISECONDS.convert(7, TimeUnit.DAYS)
val ID = 0L
const val ID = 0L
fun updateCover(context: Context, manga: SManga, input: InputStream): File? {
val dir = getBaseDirectories(context).firstOrNull()
@ -63,11 +65,11 @@ class LocalSource(private val context: Context) : CatalogueSource {
}
override val id = ID
override val name = context.getString(R.string.local_library)
override val name = context.getString(R.string.local_source)
override val lang = ""
override val supportsLatest = true
override fun toString() = context.getString(R.string.local_library)
override fun toString() = context.getString(R.string.local_source)
override fun fetchPopularManga(page: Int) = fetchSearchManga(page, "", POPULAR_FILTERS)