Merge branch 'develop'
This commit is contained in:
commit
20e3b1284f
5 changed files with 32 additions and 6 deletions
|
|
@ -59,7 +59,10 @@ private fun ExtensionFilterContent(
|
|||
items(state.languages) { language ->
|
||||
SwitchPreferenceWidget(
|
||||
modifier = Modifier.animateItemPlacement(),
|
||||
title = LocaleHelper.getSourceDisplayName(language, context),
|
||||
title = LocaleHelper.getSourceDisplayName(language, context)
|
||||
// KMK -->
|
||||
+ " (${LocaleHelper.getDisplayName(language)})",
|
||||
// KMK <--
|
||||
checked = language in state.enabledLanguages,
|
||||
onCheckedChanged = { onClickLang(language) },
|
||||
)
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@ import androidx.compose.foundation.layout.PaddingValues
|
|||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.State
|
||||
import eu.kanade.domain.source.model.installedExtension
|
||||
import eu.kanade.presentation.browse.components.GlobalSearchCardRow
|
||||
import eu.kanade.presentation.browse.components.GlobalSearchErrorResultItem
|
||||
import eu.kanade.presentation.browse.components.GlobalSearchLoadingResultItem
|
||||
|
|
@ -16,6 +17,7 @@ import eu.kanade.tachiyomi.ui.browse.source.globalsearch.SourceFilter
|
|||
import eu.kanade.tachiyomi.util.system.LocaleHelper
|
||||
import kotlinx.collections.immutable.ImmutableMap
|
||||
import tachiyomi.domain.manga.model.Manga
|
||||
import tachiyomi.domain.source.model.Source as DomainSource
|
||||
import tachiyomi.presentation.core.components.material.Scaffold
|
||||
|
||||
@Composable
|
||||
|
|
@ -74,10 +76,24 @@ internal fun GlobalSearchContent(
|
|||
) {
|
||||
items.forEach { (source, result) ->
|
||||
item(key = source.id) {
|
||||
// KMK -->
|
||||
val domainSource = DomainSource(
|
||||
source.id,
|
||||
"", "",
|
||||
supportsLatest = false,
|
||||
isStub = false
|
||||
)
|
||||
// KMK <--
|
||||
|
||||
GlobalSearchResultItem(
|
||||
title = fromSourceId?.let {
|
||||
title = (fromSourceId?.let {
|
||||
"▶ ${source.name}".takeIf { source.id == fromSourceId }
|
||||
} ?: source.name,
|
||||
} ?: source.name) +
|
||||
// KMK -->
|
||||
(domainSource.installedExtension?.let { extension ->
|
||||
" (${extension.name})".takeIf { extension.name != source.name }
|
||||
} ?: ""),
|
||||
// KMK <--
|
||||
subtitle = LocaleHelper.getLocalizedDisplayName(source.lang),
|
||||
onClick = { onClickSource(source) },
|
||||
) {
|
||||
|
|
|
|||
|
|
@ -55,7 +55,12 @@ private val defaultContent: @Composable RowScope.(Source, String?) -> Unit = { s
|
|||
.weight(1f),
|
||||
) {
|
||||
Text(
|
||||
text = source.name,
|
||||
text = source.name +
|
||||
// KMK -->
|
||||
(source.installedExtension?.let { extension ->
|
||||
" (${extension.name})".takeIf {extension.name != source.name }
|
||||
} ?: ""),
|
||||
// KMK <--
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
style = MaterialTheme.typography.bodyMedium,
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ import com.elvishew.xlog.printer.file.backup.NeverBackupStrategy
|
|||
import com.elvishew.xlog.printer.file.naming.DateFileNameGenerator
|
||||
import com.google.firebase.crashlytics.ktx.crashlytics
|
||||
import com.google.firebase.ktx.Firebase
|
||||
import com.google.firebase.ktx.initialize
|
||||
import eu.kanade.domain.DomainModule
|
||||
import eu.kanade.domain.SYDomainModule
|
||||
import eu.kanade.domain.base.BasePreferences
|
||||
|
|
@ -91,6 +92,7 @@ class App : Application(), DefaultLifecycleObserver, ImageLoaderFactory {
|
|||
@SuppressLint("LaunchActivityFromNotification")
|
||||
override fun onCreate() {
|
||||
super<Application>.onCreate()
|
||||
Firebase.initialize(this)
|
||||
|
||||
// SY -->
|
||||
if (!isDevFlavor) {
|
||||
|
|
|
|||
|
|
@ -277,8 +277,8 @@ class MyAnimeListApi(
|
|||
}
|
||||
|
||||
companion object {
|
||||
// Registered under arkon's MAL account
|
||||
private const val clientId = "8fd3313bc138e8b890551aa1de1a2589"
|
||||
// Registered under KMK's MAL account
|
||||
private const val clientId = "6aa6df85b5f386a4328e01299ad74c75"
|
||||
|
||||
private const val baseOAuthUrl = "https://myanimelist.net/v1/oauth2"
|
||||
private const val baseApiUrl = "https://api.myanimelist.net/v2"
|
||||
|
|
|
|||
Loading…
Reference in a new issue