mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-09-10 23:23:21 +02:00
Fixed downloads not being deleted after reading
Fixed dark theme maybe
This commit is contained in:
parent
5f2eb19ea3
commit
7274498462
@ -146,7 +146,8 @@ class DownloadPendingDeleter(context: Context) {
|
|||||||
private data class ChapterEntry(
|
private data class ChapterEntry(
|
||||||
val id: Long,
|
val id: Long,
|
||||||
val url: String,
|
val url: String,
|
||||||
val name: String
|
val name: String,
|
||||||
|
val scanlator: String?
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -170,7 +171,7 @@ class DownloadPendingDeleter(context: Context) {
|
|||||||
* Returns a chapter entry from a chapter model.
|
* Returns a chapter entry from a chapter model.
|
||||||
*/
|
*/
|
||||||
private fun Chapter.toEntry(): ChapterEntry {
|
private fun Chapter.toEntry(): ChapterEntry {
|
||||||
return ChapterEntry(id!!, url, name)
|
return ChapterEntry(id!!, url, name, scanlator)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -188,6 +189,7 @@ class DownloadPendingDeleter(context: Context) {
|
|||||||
private fun ChapterEntry.toModel(): Chapter {
|
private fun ChapterEntry.toModel(): Chapter {
|
||||||
return Chapter.create().also {
|
return Chapter.create().also {
|
||||||
it.id = id
|
it.id = id
|
||||||
|
it.scanlator = scanlator
|
||||||
it.url = url
|
it.url = url
|
||||||
it.name = name
|
it.name = name
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ class CloudflareInterceptor(private val context: Context) : Interceptor {
|
|||||||
val headers = request.headers.toMultimap().mapValues { it.value.getOrNull(0) ?: "" }
|
val headers = request.headers.toMultimap().mapValues { it.value.getOrNull(0) ?: "" }
|
||||||
|
|
||||||
handler.post {
|
handler.post {
|
||||||
val view = WebView(context)
|
val view = WebView(context.applicationContext)
|
||||||
webView = view
|
webView = view
|
||||||
view.settings.javaScriptEnabled = true
|
view.settings.javaScriptEnabled = true
|
||||||
view.settings.userAgentString = request.header("User-Agent")
|
view.settings.userAgentString = request.header("User-Agent")
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
|
||||||
<item android:drawable="@color/cardBackground" />
|
<item android:drawable="@color/splashBackground" />
|
||||||
|
|
||||||
<item>
|
<item>
|
||||||
<bitmap
|
<bitmap
|
||||||
android:gravity="center"
|
android:gravity="center"
|
||||||
android:src="@drawable/splash_icon"
|
android:src="@drawable/splash_icon"/>
|
||||||
android:tint="@color/snackbarBackground"/>
|
|
||||||
</item>
|
</item>
|
||||||
|
|
||||||
</layer-list>
|
</layer-list>
|
||||||
|
@ -8,4 +8,5 @@
|
|||||||
<color name="rippleColor">@color/md_white_1000_20</color>
|
<color name="rippleColor">@color/md_white_1000_20</color>
|
||||||
<color name="dialogBackground">@color/md_grey_800</color>
|
<color name="dialogBackground">@color/md_grey_800</color>
|
||||||
<color name="colorAccent">#3399FF</color>
|
<color name="colorAccent">#3399FF</color>
|
||||||
|
<color name="splashBackground">@color/colorDarkPrimary</color>
|
||||||
</resources>
|
</resources>
|
@ -6,6 +6,7 @@
|
|||||||
<color name="drawerHighlight">@color/md_black_1000_12</color>
|
<color name="drawerHighlight">@color/md_black_1000_12</color>
|
||||||
<color name="drawerPrimary">@color/colorPrimary</color>
|
<color name="drawerPrimary">@color/colorPrimary</color>
|
||||||
<color name="cardBackground">#FFFFFF</color>
|
<color name="cardBackground">#FFFFFF</color>
|
||||||
|
<color name="splashBackground">#455A64</color>
|
||||||
<color name="snackbarBackground">#323232</color>
|
<color name="snackbarBackground">#323232</color>
|
||||||
<color name="trueSnackbarBackground">#323232</color>
|
<color name="trueSnackbarBackground">#323232</color>
|
||||||
<color name="dialogBackground">@color/md_white_1000</color>
|
<color name="dialogBackground">@color/md_white_1000</color>
|
||||||
@ -16,8 +17,6 @@
|
|||||||
<color name="colorDarkPrimaryDark">#212121</color>
|
<color name="colorDarkPrimaryDark">#212121</color>
|
||||||
<color name="colorAmoledPrimary">@color/md_black_1000</color>
|
<color name="colorAmoledPrimary">@color/md_black_1000</color>
|
||||||
|
|
||||||
<color name="colorSplash">#455A64</color>
|
|
||||||
|
|
||||||
<!-- Light Theme -->
|
<!-- Light Theme -->
|
||||||
<color name="colorAccentLight">@color/md_blue_A400</color>
|
<color name="colorAccentLight">@color/md_blue_A400</color>
|
||||||
<color name="textColorPrimaryLight">@color/md_black_1000_87</color>
|
<color name="textColorPrimaryLight">@color/md_black_1000_87</color>
|
||||||
|
Loading…
Reference in New Issue
Block a user