mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-11-20 06:39:20 +01:00
Fixed #789
Co-Authored-By: arkon <4098258+arkon@users.noreply.github.com>
This commit is contained in:
parent
a503d95bec
commit
e4b5f084a9
@ -185,7 +185,7 @@ class ExtensionDetailsController(bundle: Bundle? = null) :
|
|||||||
|
|
||||||
val prefs = mutableListOf<Preference>()
|
val prefs = mutableListOf<Preference>()
|
||||||
val block: (@DSL SwitchPreferenceCompat).() -> Unit = {
|
val block: (@DSL SwitchPreferenceCompat).() -> Unit = {
|
||||||
key = source.getPreferenceKey()
|
key = source.getPreferenceKey() + "_enabled"
|
||||||
title = when {
|
title = when {
|
||||||
isMultiSource && !isMultiLangSingleSource -> source.toString()
|
isMultiSource && !isMultiLangSingleSource -> source.toString()
|
||||||
else -> LocaleHelper.getSourceDisplayName(source.lang, context)
|
else -> LocaleHelper.getSourceDisplayName(source.lang, context)
|
||||||
|
@ -53,12 +53,17 @@ class SourceItem(val source: CatalogueSource, header: LangItem? = null, val isPi
|
|||||||
|
|
||||||
override fun equals(other: Any?): Boolean {
|
override fun equals(other: Any?): Boolean {
|
||||||
if (other is SourceItem) {
|
if (other is SourceItem) {
|
||||||
return source.id == other.source.id && header?.code == other.header?.code
|
return source.id == other.source.id &&
|
||||||
|
header?.code == other.header?.code &&
|
||||||
|
isPinned == other.isPinned
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun hashCode(): Int {
|
override fun hashCode(): Int {
|
||||||
return source.id.hashCode() + (header?.code?.hashCode() ?: 0).toInt()
|
var result = source.id.hashCode()
|
||||||
|
result = 31 * result + (header?.hashCode() ?: 0)
|
||||||
|
result = 31 * result + isPinned.hashCode()
|
||||||
|
return result
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user