mirror of
https://github.com/mihonapp/mihon.git
synced 2025-06-27 03:27:51 +02:00
Compare commits
5 Commits
Author | SHA1 | Date | |
---|---|---|---|
0db4fcc27e | |||
f3080b6277 | |||
69cbbd5811 | |||
0b85760939 | |||
03f3a4805f |
@ -38,8 +38,8 @@ android {
|
|||||||
minSdkVersion 16
|
minSdkVersion 16
|
||||||
targetSdkVersion 25
|
targetSdkVersion 25
|
||||||
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
|
||||||
versionCode 25
|
versionCode 26
|
||||||
versionName "0.6.2"
|
versionName "0.6.3"
|
||||||
|
|
||||||
buildConfigField "String", "COMMIT_COUNT", "\"${getCommitCount()}\""
|
buildConfigField "String", "COMMIT_COUNT", "\"${getCommitCount()}\""
|
||||||
buildConfigField "String", "COMMIT_SHA", "\"${getGitSha()}\""
|
buildConfigField "String", "COMMIT_SHA", "\"${getGitSha()}\""
|
||||||
|
@ -45,6 +45,16 @@ object Migrations {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (oldVersion < 26) {
|
||||||
|
// Delete external chapter cache dir.
|
||||||
|
val extCache = context.externalCacheDir
|
||||||
|
if (extCache != null) {
|
||||||
|
val chapterCache = File(extCache, "chapter_disk_cache")
|
||||||
|
if (chapterCache.exists()) {
|
||||||
|
chapterCache.deleteRecursively()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@ -44,13 +44,8 @@ class ChapterCache(private val context: Context) {
|
|||||||
/** Google Json class used for parsing JSON files. */
|
/** Google Json class used for parsing JSON files. */
|
||||||
private val gson: Gson by injectLazy()
|
private val gson: Gson by injectLazy()
|
||||||
|
|
||||||
/** Parent directory of the cache. Ensure not null and not root directory or fallback
|
|
||||||
* to internal cache directory. **/
|
|
||||||
private val basePath = context.externalCacheDir?.takeIf { it.absolutePath.length > 1 }
|
|
||||||
?: context.cacheDir
|
|
||||||
|
|
||||||
/** Cache class used for cache management. */
|
/** Cache class used for cache management. */
|
||||||
private val diskCache = DiskLruCache.open(File(basePath, PARAMETER_CACHE_DIRECTORY),
|
private val diskCache = DiskLruCache.open(File(context.cacheDir, PARAMETER_CACHE_DIRECTORY),
|
||||||
PARAMETER_APP_VERSION,
|
PARAMETER_APP_VERSION,
|
||||||
PARAMETER_VALUE_COUNT,
|
PARAMETER_VALUE_COUNT,
|
||||||
PARAMETER_CACHE_SIZE)
|
PARAMETER_CACHE_SIZE)
|
||||||
@ -86,10 +81,10 @@ class ChapterCache(private val context: Context) {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Remove the extension from the file to get the key of the cache
|
// Remove the extension from the file to get the key of the cache
|
||||||
val key = file.substring(0, file.lastIndexOf("."))
|
val key = file.substringBeforeLast(".")
|
||||||
// Remove file from cache.
|
// Remove file from cache.
|
||||||
return diskCache.remove(key)
|
return diskCache.remove(key)
|
||||||
} catch (e: IOException) {
|
} catch (e: Exception) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -331,6 +331,11 @@ open class CatalogueController(bundle: Bundle? = null) :
|
|||||||
if (query == newQuery)
|
if (query == newQuery)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
// FIXME dirty fix to restore the toolbar buttons after closing search mode.
|
||||||
|
if (newQuery == "") {
|
||||||
|
activity?.invalidateOptionsMenu()
|
||||||
|
}
|
||||||
|
|
||||||
showProgressBar()
|
showProgressBar()
|
||||||
adapter?.clear()
|
adapter?.clear()
|
||||||
|
|
||||||
|
@ -27,10 +27,7 @@ import eu.kanade.tachiyomi.ui.reader.viewer.pager.horizontal.LeftToRightReader
|
|||||||
import eu.kanade.tachiyomi.ui.reader.viewer.pager.horizontal.RightToLeftReader
|
import eu.kanade.tachiyomi.ui.reader.viewer.pager.horizontal.RightToLeftReader
|
||||||
import eu.kanade.tachiyomi.ui.reader.viewer.pager.vertical.VerticalReader
|
import eu.kanade.tachiyomi.ui.reader.viewer.pager.vertical.VerticalReader
|
||||||
import eu.kanade.tachiyomi.ui.reader.viewer.webtoon.WebtoonReader
|
import eu.kanade.tachiyomi.ui.reader.viewer.webtoon.WebtoonReader
|
||||||
import eu.kanade.tachiyomi.util.GLUtil
|
import eu.kanade.tachiyomi.util.*
|
||||||
import eu.kanade.tachiyomi.util.SharedData
|
|
||||||
import eu.kanade.tachiyomi.util.plusAssign
|
|
||||||
import eu.kanade.tachiyomi.util.toast
|
|
||||||
import eu.kanade.tachiyomi.widget.SimpleAnimationListener
|
import eu.kanade.tachiyomi.widget.SimpleAnimationListener
|
||||||
import eu.kanade.tachiyomi.widget.SimpleSeekBarListener
|
import eu.kanade.tachiyomi.widget.SimpleSeekBarListener
|
||||||
import kotlinx.android.synthetic.main.reader_activity.*
|
import kotlinx.android.synthetic.main.reader_activity.*
|
||||||
@ -42,6 +39,7 @@ import rx.android.schedulers.AndroidSchedulers
|
|||||||
import rx.subscriptions.CompositeSubscription
|
import rx.subscriptions.CompositeSubscription
|
||||||
import timber.log.Timber
|
import timber.log.Timber
|
||||||
import uy.kohesive.injekt.injectLazy
|
import uy.kohesive.injekt.injectLazy
|
||||||
|
import java.io.File
|
||||||
import java.text.DecimalFormat
|
import java.text.DecimalFormat
|
||||||
import java.util.concurrent.TimeUnit
|
import java.util.concurrent.TimeUnit
|
||||||
|
|
||||||
@ -572,8 +570,12 @@ class ReaderActivity : BaseRxActivity<ReaderPresenter>() {
|
|||||||
if (page.status != Page.READY)
|
if (page.status != Page.READY)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
var uri = page.uri ?: return
|
||||||
|
if (uri.toString().startsWith("file://")) {
|
||||||
|
uri = File(uri.toString().substringAfter("file://")).getUriCompat(this)
|
||||||
|
}
|
||||||
val intent = Intent(Intent.ACTION_SEND).apply {
|
val intent = Intent(Intent.ACTION_SEND).apply {
|
||||||
putExtra(Intent.EXTRA_STREAM, page.uri)
|
putExtra(Intent.EXTRA_STREAM, uri)
|
||||||
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_GRANT_READ_URI_PERMISSION
|
flags = Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_GRANT_READ_URI_PERMISSION
|
||||||
type = "image/*"
|
type = "image/*"
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<changelog bulletedList="true">
|
<changelog bulletedList="true">
|
||||||
|
<changelogversion versionName="v0.6.3" changeDate="">
|
||||||
|
<changelogtext>Fixed a crash when retrying a page.</changelogtext>
|
||||||
|
|
||||||
|
<changelogtext>Fixed a crash when sharing an image.</changelogtext>
|
||||||
|
|
||||||
|
<changelogtext>Fixed disappearing toolbar buttons in the catalog after a search.</changelogtext>
|
||||||
|
</changelogversion>
|
||||||
|
|
||||||
<changelogversion versionName="v0.6.2" changeDate="">
|
<changelogversion versionName="v0.6.2" changeDate="">
|
||||||
<changelogtext>Added a new completed manga filter for the library.</changelogtext>
|
<changelogtext>Added a new completed manga filter for the library.</changelogtext>
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user