diff --git a/app/src/main/java/eu/kanade/presentation/browse/ExtensionFilterScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/ExtensionFilterScreen.kt index c65f0d0b15..4f589955df 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/ExtensionFilterScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/ExtensionFilterScreen.kt @@ -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) }, ) diff --git a/app/src/main/java/eu/kanade/presentation/browse/GlobalSearchScreen.kt b/app/src/main/java/eu/kanade/presentation/browse/GlobalSearchScreen.kt index 0ea1adf2ef..80e13f03c2 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/GlobalSearchScreen.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/GlobalSearchScreen.kt @@ -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) }, ) { diff --git a/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt b/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt index 951fb307bc..32e14da082 100644 --- a/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt +++ b/app/src/main/java/eu/kanade/presentation/browse/components/BaseSourceItem.kt @@ -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, diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index fe34d8550c..4296dd3c27 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -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.onCreate() + Firebase.initialize(this) // SY --> if (!isDevFlavor) { diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt index c67cc2a2a5..72cb6d2383 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/track/myanimelist/MyAnimeListApi.kt @@ -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"