Various bug fixes.
This commit is contained in:
parent
2b988c51ad
commit
606de03c7c
@ -143,6 +143,10 @@ class MainActivity : BaseActivity() {
|
|||||||
nav_view.post { recreate() }
|
nav_view.post { recreate() }
|
||||||
} else if (resultCode and SettingsActivity.FLAG_LANG_CHANGED != 0) {
|
} else if (resultCode and SettingsActivity.FLAG_LANG_CHANGED != 0) {
|
||||||
nav_view.post { recreate() }
|
nav_view.post { recreate() }
|
||||||
|
} else if (resultCode and SettingsActivity.FLAG_EH_RECREATE != 0) {
|
||||||
|
TaskStackBuilder.create(this)
|
||||||
|
.addNextIntent(Intent(this, MainActivity::class.java))
|
||||||
|
.startActivities()
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
super.onActivityResult(requestCode, resultCode, data)
|
super.onActivityResult(requestCode, resultCode, data)
|
||||||
|
@ -80,6 +80,7 @@ class SettingsActivity : BaseActivity(),
|
|||||||
const val FLAG_THEME_CHANGED = 0x1
|
const val FLAG_THEME_CHANGED = 0x1
|
||||||
const val FLAG_DATABASE_CLEARED = 0x2
|
const val FLAG_DATABASE_CLEARED = 0x2
|
||||||
const val FLAG_LANG_CHANGED = 0x4
|
const val FLAG_LANG_CHANGED = 0x4
|
||||||
|
const val FLAG_EH_RECREATE = 0x8
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -35,6 +35,10 @@ class SettingsEhFragment : SettingsFragment() {
|
|||||||
findPreference("ex_migrate_library") as Preference
|
findPreference("ex_migrate_library") as Preference
|
||||||
}
|
}
|
||||||
|
|
||||||
|
val useJpTitlePref by lazy {
|
||||||
|
findPreference("use_jp_title") as SwitchPreference
|
||||||
|
}
|
||||||
|
|
||||||
override fun onViewCreated(view: View, savedState: Bundle?) {
|
override fun onViewCreated(view: View, savedState: Bundle?) {
|
||||||
super.onViewCreated(view, savedState)
|
super.onViewCreated(view, savedState)
|
||||||
|
|
||||||
@ -46,6 +50,7 @@ class SettingsEhFragment : SettingsFragment() {
|
|||||||
|
|
||||||
enableExhentaiPref.setOnPreferenceChangeListener { preference, newVal ->
|
enableExhentaiPref.setOnPreferenceChangeListener { preference, newVal ->
|
||||||
newVal as Boolean
|
newVal as Boolean
|
||||||
|
(activity as SettingsActivity).parentFlags = SettingsActivity.FLAG_EH_RECREATE
|
||||||
if(!newVal) {
|
if(!newVal) {
|
||||||
preferences.enableExhentai().set(false)
|
preferences.enableExhentai().set(false)
|
||||||
true
|
true
|
||||||
@ -59,5 +64,10 @@ class SettingsEhFragment : SettingsFragment() {
|
|||||||
MetadataFetchDialog().askMigration(activity)
|
MetadataFetchDialog().askMigration(activity)
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
useJpTitlePref.setOnPreferenceChangeListener { preference, any ->
|
||||||
|
(activity as SettingsActivity).parentFlags = SettingsActivity.FLAG_EH_RECREATE
|
||||||
|
true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,10 +1,13 @@
|
|||||||
package exh.metadata
|
package exh.metadata
|
||||||
|
|
||||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||||
|
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||||
|
import eu.kanade.tachiyomi.data.preference.getOrDefault
|
||||||
import eu.kanade.tachiyomi.util.UrlUtil
|
import eu.kanade.tachiyomi.util.UrlUtil
|
||||||
import exh.metadata.models.ExGalleryMetadata
|
import exh.metadata.models.ExGalleryMetadata
|
||||||
import exh.metadata.models.Tag
|
import exh.metadata.models.Tag
|
||||||
import exh.plusAssign
|
import exh.plusAssign
|
||||||
|
import uy.kohesive.injekt.injectLazy
|
||||||
import java.text.SimpleDateFormat
|
import java.text.SimpleDateFormat
|
||||||
import java.util.*
|
import java.util.*
|
||||||
|
|
||||||
@ -23,6 +26,8 @@ private val ONGOING_SUFFIX = arrayOf(
|
|||||||
|
|
||||||
val EX_DATE_FORMAT = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.US)
|
val EX_DATE_FORMAT = SimpleDateFormat("yyyy-MM-dd HH:mm", Locale.US)
|
||||||
|
|
||||||
|
private val prefs: PreferencesHelper by injectLazy()
|
||||||
|
|
||||||
fun ExGalleryMetadata.copyTo(manga: Manga) {
|
fun ExGalleryMetadata.copyTo(manga: Manga) {
|
||||||
exh?.let {
|
exh?.let {
|
||||||
manga.source = if(it)
|
manga.source = if(it)
|
||||||
@ -32,7 +37,12 @@ fun ExGalleryMetadata.copyTo(manga: Manga) {
|
|||||||
}
|
}
|
||||||
url?.let { manga.url = it }
|
url?.let { manga.url = it }
|
||||||
thumbnailUrl?.let { manga.thumbnail_url = it }
|
thumbnailUrl?.let { manga.thumbnail_url = it }
|
||||||
title?.let { manga.title = it }
|
|
||||||
|
val titleObj = if(prefs.useJapaneseTitle().getOrDefault())
|
||||||
|
altTitle ?: title
|
||||||
|
else
|
||||||
|
title
|
||||||
|
titleObj?.let { manga.title = it }
|
||||||
|
|
||||||
//Set artist (if we can find one)
|
//Set artist (if we can find one)
|
||||||
tags[ARTIST_NAMESPACE]?.let {
|
tags[ARTIST_NAMESPACE]?.let {
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<changelog bulletedList="false">
|
<changelog bulletedList="false">
|
||||||
|
<!--
|
||||||
|
|
||||||
<changelogversion changeDate="" versionName="r959">
|
<changelogversion changeDate="" versionName="r959">
|
||||||
<changelogtext>The download manager has been rewritten and it's possible some of your downloads
|
<changelogtext>The download manager has been rewritten and it's possible some of your downloads
|
||||||
@ -26,6 +27,6 @@
|
|||||||
<changelogtext>Kissmanga covers may not load anymore. The only workaround is to update the details of the manga
|
<changelogtext>Kissmanga covers may not load anymore. The only workaround is to update the details of the manga
|
||||||
from the info tab, or clearing the database (the latter won't fix covers from library manga).
|
from the info tab, or clearing the database (the latter won't fix covers from library manga).
|
||||||
</changelogtext>
|
</changelogtext>
|
||||||
</changelogversion>
|
</changelogversion>-->
|
||||||
|
|
||||||
</changelog>
|
</changelog>
|
@ -1,10 +1,37 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<changelog bulletedList="true">
|
<changelog bulletedList="true">
|
||||||
<changelogversion versionName="v0.2.2" changeDate="">
|
<changelogversion versionName="v4.0.0" changeDate="">
|
||||||
<changelogtext>[b]Important![/b] The application is now signed with a different key, you must migrate over your previous library if you wish to keep it!
|
<changelogtext>
|
||||||
|
[b]Important![/b] The application is now signed with a different key, you must migrate over your previous library if you wish to keep it!
|
||||||
</changelogtext>
|
</changelogtext>
|
||||||
|
|
||||||
<changelogtext>Bugfixes and more improvements.</changelogtext>
|
<changelogtext>
|
||||||
|
Upstream merge
|
||||||
|
</changelogtext>
|
||||||
|
|
||||||
|
<changelogtext>
|
||||||
|
Backend rewrite
|
||||||
|
</changelogtext>
|
||||||
|
|
||||||
|
<changelogtext>
|
||||||
|
Optimizations to cookies and ExHentai login
|
||||||
|
</changelogtext>
|
||||||
|
|
||||||
|
<changelogtext>
|
||||||
|
Add more customization to E-Hentai/ExHentai
|
||||||
|
</changelogtext>
|
||||||
|
|
||||||
|
<changelogtext>
|
||||||
|
Add offline gallery search engine
|
||||||
|
</changelogtext>
|
||||||
|
|
||||||
|
<changelogtext>
|
||||||
|
Various aesthetic improvements
|
||||||
|
</changelogtext>
|
||||||
|
|
||||||
|
<changelogtext>
|
||||||
|
Bugfixes and more improvements
|
||||||
|
</changelogtext>
|
||||||
</changelogversion>
|
</changelogversion>
|
||||||
|
|
||||||
</changelog>
|
</changelog>
|
@ -17,7 +17,7 @@
|
|||||||
android:title="@string/pref_enable_acra" />
|
android:title="@string/pref_enable_acra" />
|
||||||
|
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:defaultValue="false"
|
android:defaultValue="true"
|
||||||
android:key="@string/pref_enable_automatic_updates_key"
|
android:key="@string/pref_enable_automatic_updates_key"
|
||||||
android:summary="@string/pref_enable_automatic_updates_summary"
|
android:summary="@string/pref_enable_automatic_updates_summary"
|
||||||
android:title="@string/pref_enable_automatic_updates" />
|
android:title="@string/pref_enable_automatic_updates" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user