Fix: ktlint config for SY code (#712)

* Add more editor configs and move ktlint config to it (mihonapp/mihon#1731)

(cherry picked from commit 34d1e6fa278846dd8eb6ea82c936818d4610d3c2)

* more ktlint config

* fix compile

* restore comment-wrapping

* restore all of them

* disable in gradle.kts

* cleanup

* remove filenamktlint_standard_filename

* fix filename

* remove unused EhAssets

* ktlint_standard_multiline-expression-wrapping

* property-naming & function-naming

* ktlint_standard_argument-list-wrapping

* fix argument-list-wrapping

* Improve  in case source is null

related to commit 343cd372

* comment

* comment

* comment

* comment

* comment

* comment

* comment

* comment

* Revert "Improve  in case source is null"

This reverts commit 08e317bb075b4b634f0c6f19f11eb78b99406e59.

* Revert "remove unused EhAssets"

This reverts commit e2cfc3e0c2b8d5b8bac41f2dfc4d9baef332f83e.

---------

Co-authored-by: AntsyLich <59261191+AntsyLich@users.noreply.github.com>
This commit is contained in:
Cuong-Tran 2025-02-18 13:44:57 +07:00 committed by GitHub
parent 56a15d1da6
commit 4c08f61f68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 124 additions and 69 deletions

View file

@ -26,3 +26,10 @@ ktlint_standard_class-signature = disabled
ktlint_standard_discouraged-comment-location = disabled ktlint_standard_discouraged-comment-location = disabled
ktlint_standard_function-expression-body = disabled ktlint_standard_function-expression-body = disabled
ktlint_standard_function-signature = disabled ktlint_standard_function-signature = disabled
# Avoid ktlint format messy code from SY
ktlint_standard_max-line-length = disabled
ktlint_standard_comment-wrapping = disabled
ktlint_standard_type-argument-comment = disabled
ktlint_standard_value-argument-comment = disabled
ktlint_standard_value-parameter-comment = disabled

View file

@ -15,8 +15,10 @@ import tachiyomi.source.local.isLocal
*/ */
fun List<Chapter>.applyFilters( fun List<Chapter>.applyFilters(
manga: Manga, manga: Manga,
downloadManager: DownloadManager, /* SY --> */ downloadManager: DownloadManager,
mergedManga: Map<Long, Manga>, /* SY <-- */ // SY -->
mergedManga: Map<Long, Manga>,
// SY <--
): List<Chapter> { ): List<Chapter> {
val isLocalManga = manga.isLocal() val isLocalManga = manga.isLocal()
val unreadFilter = manga.unreadFilter val unreadFilter = manga.unreadFilter
@ -34,7 +36,9 @@ fun List<Chapter>.applyFilters(
val downloaded = downloadManager.isChapterDownloaded( val downloaded = downloadManager.isChapterDownloaded(
chapter.name, chapter.name,
chapter.scanlator, chapter.scanlator,
/* SY --> */ manga.ogTitle /* SY <-- */, // SY -->
manga.ogTitle,
// SY <--
manga.source, manga.source,
) )
downloaded || isLocalManga downloaded || isLocalManga

View file

@ -42,7 +42,8 @@ fun SyncFavoritesProgressDialog(
text = context.stringResource( text = context.stringResource(
SYMR.strings.favorites_sync_bad_library_state, SYMR.strings.favorites_sync_bad_library_state,
context.stringResource( context.stringResource(
SYMR.strings.favorites_sync_gallery_in_multiple_categories, status.mangaTitle, SYMR.strings.favorites_sync_gallery_in_multiple_categories,
status.mangaTitle,
status.categories.joinToString(), status.categories.joinToString(),
), ),
), ),
@ -62,14 +63,10 @@ fun SyncFavoritesProgressDialog(
when (it) { when (it) {
is FavoritesSyncStatus.SyncError.GallerySyncError.GalleryAddFail -> is FavoritesSyncStatus.SyncError.GallerySyncError.GalleryAddFail ->
context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local) + context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local) +
context.stringResource( context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local_error, it.title, it.reason)
SYMR.strings.favorites_sync_failed_to_add_to_local_error, it.title, it.reason,
)
is FavoritesSyncStatus.SyncError.GallerySyncError.InvalidGalleryFail -> is FavoritesSyncStatus.SyncError.GallerySyncError.InvalidGalleryFail ->
context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local) + context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local) +
context.stringResource( context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local_unknown_type, it.title, it.url)
SYMR.strings.favorites_sync_failed_to_add_to_local_unknown_type, it.title, it.url,
)
is FavoritesSyncStatus.SyncError.GallerySyncError.UnableToAddGalleryToRemote -> is FavoritesSyncStatus.SyncError.GallerySyncError.UnableToAddGalleryToRemote ->
context.stringResource(SYMR.strings.favorites_sync_unable_to_add_to_remote, it.title, it.gid) context.stringResource(SYMR.strings.favorites_sync_unable_to_add_to_remote, it.title, it.gid)
FavoritesSyncStatus.SyncError.GallerySyncError.UnableToDeleteFromRemote -> FavoritesSyncStatus.SyncError.GallerySyncError.UnableToDeleteFromRemote ->
@ -100,14 +97,10 @@ fun SyncFavoritesProgressDialog(
context.stringResource(SYMR.strings.favorites_sync_unknown_error, status.message) context.stringResource(SYMR.strings.favorites_sync_unknown_error, status.message)
is FavoritesSyncStatus.SyncError.GallerySyncError.GalleryAddFail -> is FavoritesSyncStatus.SyncError.GallerySyncError.GalleryAddFail ->
context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local) + context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local) +
context.stringResource( context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local_error, status.title, status.reason)
SYMR.strings.favorites_sync_failed_to_add_to_local_error, status.title, status.reason,
)
is FavoritesSyncStatus.SyncError.GallerySyncError.InvalidGalleryFail -> is FavoritesSyncStatus.SyncError.GallerySyncError.InvalidGalleryFail ->
context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local) + context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local) +
context.stringResource( context.stringResource(SYMR.strings.favorites_sync_failed_to_add_to_local_unknown_type, status.title, status.url)
SYMR.strings.favorites_sync_failed_to_add_to_local_unknown_type, status.title, status.url,
)
is FavoritesSyncStatus.SyncError.GallerySyncError.UnableToAddGalleryToRemote -> is FavoritesSyncStatus.SyncError.GallerySyncError.UnableToAddGalleryToRemote ->
context.stringResource(SYMR.strings.favorites_sync_unable_to_add_to_remote, status.title, status.gid) context.stringResource(SYMR.strings.favorites_sync_unable_to_add_to_remote, status.title, status.gid)
FavoritesSyncStatus.SyncError.GallerySyncError.UnableToDeleteFromRemote -> FavoritesSyncStatus.SyncError.GallerySyncError.UnableToDeleteFromRemote ->

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package eu.kanade.presentation.manga.components package eu.kanade.presentation.manga.components
import androidx.annotation.ColorInt import androidx.annotation.ColorInt

View file

@ -1,3 +1,5 @@
@file:Suppress("FunctionName")
package eu.kanade.presentation.manga.components package eu.kanade.presentation.manga.components
import androidx.compose.foundation.clickable import androidx.compose.foundation.clickable

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package eu.kanade.presentation.more.settings.screen.about package eu.kanade.presentation.more.settings.screen.about
import androidx.compose.foundation.layout.Arrangement import androidx.compose.foundation.layout.Arrangement

View file

@ -48,7 +48,8 @@ class MangaBackupCreator(
getCustomMangaInfo.get(manga.id) getCustomMangaInfo.get(manga.id)
} else { } else {
null null
}, /* SY <-- */ },
// SY <--
) )
// SY --> // SY -->

View file

@ -27,7 +27,9 @@ class CategoriesRestorer(
val order = nextOrder++ val order = nextOrder++
handler.awaitOneExecutable { handler.awaitOneExecutable {
categoriesQueries.insert( categoriesQueries.insert(
it.name, order, it.flags, it.name,
order,
it.flags,
// KMK --> // KMK -->
hidden = if (it.hidden) 1L else 0L, hidden = if (it.hidden) 1L else 0L,
// KMK <-- // KMK <--

View file

@ -124,7 +124,8 @@ class PagePreviewFetcher(
private suspend fun executeNetworkRequest(): Response { private suspend fun executeNetworkRequest(): Response {
val response = sourceLazy.value?.fetchPreviewImage( val response = sourceLazy.value?.fetchPreviewImage(
page.getPagePreviewInfo(), getCacheControl(), page.getPagePreviewInfo(),
getCacheControl(),
) ?: callFactoryLazy.value.newCall(newRequest()).await() ) ?: callFactoryLazy.value.newCall(newRequest()).await()
if (!response.isSuccessful && response.code != HTTP_NOT_MODIFIED) { if (!response.isSuccessful && response.code != HTTP_NOT_MODIFIED) {
response.close() response.close()

View file

@ -247,7 +247,9 @@ class DownloadCache(
val sourceDir = rootDownloadsDir.sourceDirs[manga.source] ?: return val sourceDir = rootDownloadsDir.sourceDirs[manga.source] ?: return
val mangaDir = sourceDir.mangaDirs[ val mangaDir = sourceDir.mangaDirs[
provider.getMangaDirName( provider.getMangaDirName(
/* SY --> */ manga.ogTitle, /* SY <-- */ // SY -->
manga.ogTitle,
// SY <--
), ),
] ?: return ] ?: return
provider.getValidChapterDirNames(chapter.name, chapter.scanlator).forEach { provider.getValidChapterDirNames(chapter.name, chapter.scanlator).forEach {
@ -286,7 +288,9 @@ class DownloadCache(
val sourceDir = rootDownloadsDir.sourceDirs[manga.source] ?: return val sourceDir = rootDownloadsDir.sourceDirs[manga.source] ?: return
val mangaDir = sourceDir.mangaDirs[ val mangaDir = sourceDir.mangaDirs[
provider.getMangaDirName( provider.getMangaDirName(
/* SY --> */ manga.ogTitle, /* SY <-- */ // SY -->
manga.ogTitle,
// SY <--
), ),
] ?: return ] ?: return
chapters.forEach { chapter -> chapters.forEach { chapter ->

View file

@ -167,7 +167,9 @@ class DownloadManager(
val chapterDir = provider.findChapterDir( val chapterDir = provider.findChapterDir(
chapter.name, chapter.name,
chapter.scanlator, chapter.scanlator,
/* SY --> */ manga.ogTitle /* SY <-- */, // SY -->
manga.ogTitle,
// SY <--
source, source,
) )
val files = chapterDir?.listFiles().orEmpty() val files = chapterDir?.listFiles().orEmpty()

View file

@ -628,7 +628,9 @@ class LibraryUpdateJob(private val context: Context, workerParams: WorkerParamet
count++ count++
notifier.showProgressNotification( notifier.showProgressNotification(
listOf(Manga.create().copy(ogTitle = networkManga.title)), count, size, listOf(Manga.create().copy(ogTitle = networkManga.title)),
count,
size,
) )
var dbManga = getManga.await(networkManga.url, mangaDex.id) var dbManga = getManga.await(networkManga.url, mangaDex.id)

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package eu.kanade.tachiyomi.source package eu.kanade.tachiyomi.source
import android.content.Context import android.content.Context

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package eu.kanade.tachiyomi.source.online.all package eu.kanade.tachiyomi.source.online.all
import android.content.Context import android.content.Context

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package eu.kanade.tachiyomi.ui.browse.feed package eu.kanade.tachiyomi.ui.browse.feed
import androidx.compose.runtime.Composable import androidx.compose.runtime.Composable

View file

@ -1240,7 +1240,9 @@ class ReaderActivity : BaseActivity() {
// SY --> // SY -->
val text = if (secondPage != null) { val text = if (secondPage != null) {
stringResource( stringResource(
SYMR.strings.share_pages_info, manga.title, chapter.name, SYMR.strings.share_pages_info,
manga.title,
chapter.name,
if (resources.configuration.layoutDirection == if (resources.configuration.layoutDirection ==
View.LAYOUT_DIRECTION_LTR View.LAYOUT_DIRECTION_LTR
) { ) {

View file

@ -370,7 +370,7 @@ class ReaderViewModel @JvmOverloads constructor(
mutableState.update { mutableState.update {
it.copy( it.copy(
manga = manga, manga = manga,
/* SY --> */ // SY -->
meta = metadata, meta = metadata,
mergedManga = mergedManga, mergedManga = mergedManga,
dateRelativeTime = relativeTime, dateRelativeTime = relativeTime,
@ -380,7 +380,7 @@ class ReaderViewModel @JvmOverloads constructor(
autoScrollFreq.toString() autoScrollFreq.toString()
}, },
isAutoScrollEnabled = autoScrollFreq != -1f, isAutoScrollEnabled = autoScrollFreq != -1f,
/* SY <-- */ // SY <--
) )
} }
if (chapterId == -1L) chapterId = initialChapterId if (chapterId == -1L) chapterId = initialChapterId
@ -392,17 +392,21 @@ class ReaderViewModel @JvmOverloads constructor(
downloadManager = downloadManager, downloadManager = downloadManager,
downloadProvider = downloadProvider, downloadProvider = downloadProvider,
manga = manga, manga = manga,
source = source, /* SY --> */ source = source,
// SY -->
sourceManager = sourceManager, sourceManager = sourceManager,
readerPrefs = readerPreferences, readerPrefs = readerPreferences,
mergedReferences = mergedReferences, mergedReferences = mergedReferences,
mergedManga = mergedManga, /* SY <-- */ mergedManga = mergedManga,
// SY <--
) )
loadChapter( loadChapter(
loader!!, loader!!,
chapterList.first { chapterId == it.chapter.id }, chapterList.first { chapterId == it.chapter.id },
/* SY --> */page, /* SY <-- */ // SY -->
page,
// SY <--
) )
Result.success(true) Result.success(true)
} else { } else {
@ -538,7 +542,9 @@ class ReaderViewModel @JvmOverloads constructor(
val isDownloaded = downloadManager.isChapterDownloaded( val isDownloaded = downloadManager.isChapterDownloaded(
dbChapter.name, dbChapter.name,
dbChapter.scanlator, dbChapter.scanlator,
/* SY --> */ manga.ogTitle /* SY <-- */, // SY -->
manga.ogTitle,
// SY <--
manga.source, manga.source,
skipCache = true, skipCache = true,
) )
@ -677,8 +683,10 @@ class ReaderViewModel @JvmOverloads constructor(
*/ */
private suspend fun updateChapterProgress( private suspend fun updateChapterProgress(
readerChapter: ReaderChapter, readerChapter: ReaderChapter,
page: Page/* SY --> */, page: Page,
hasExtraPage: Boolean, /* SY <-- */ // SY -->
hasExtraPage: Boolean,
// SY <--
) { ) {
val pageIndex = page.index val pageIndex = page.index
val syncTriggerOpt = syncPreferences.getSyncTriggerOptions() val syncTriggerOpt = syncPreferences.getSyncTriggerOptions()
@ -1378,8 +1386,10 @@ class ReaderViewModel @JvmOverloads constructor(
// SY <-- // SY <--
data class PageActions( data class PageActions(
val page: ReaderPage/* SY --> */, val page: ReaderPage,
val extraPage: ReaderPage? = null, /* SY <-- */ // SY -->
val extraPage: ReaderPage? = null,
// SY <--
) : Dialog ) : Dialog
// SY --> // SY -->
@ -1398,8 +1408,10 @@ class ReaderViewModel @JvmOverloads constructor(
data class SavedImage(val result: SaveImageResult) : Event data class SavedImage(val result: SaveImageResult) : Event
data class ShareImage( data class ShareImage(
val uri: Uri, val uri: Uri,
val page: ReaderPage/* SY --> */, val page: ReaderPage,
val secondPage: ReaderPage? = null, /* SY <-- */ // SY -->
val secondPage: ReaderPage? = null,
// SY <--
) : Event ) : Event
data class CopyImage(val uri: Uri) : Event data class CopyImage(val uri: Uri) : Event
} }

View file

@ -94,8 +94,10 @@ class ChapterLoader(
val dbChapter = chapter.chapter val dbChapter = chapter.chapter
val isDownloaded = downloadManager.isChapterDownloaded( val isDownloaded = downloadManager.isChapterDownloaded(
chapterName = dbChapter.name, chapterName = dbChapter.name,
chapterScanlator = dbChapter.scanlator, /* SY --> */ chapterScanlator = dbChapter.scanlator,
mangaTitle = manga.ogTitle /* SY <-- */, // SY -->
mangaTitle = manga.ogTitle,
// SY <--
sourceId = manga.source, sourceId = manga.source,
skipCache = true, skipCache = true,
) )

View file

@ -12,8 +12,10 @@ import tachiyomi.domain.manga.model.Manga
*/ */
fun List<Chapter>.getNextUnread( fun List<Chapter>.getNextUnread(
manga: Manga, manga: Manga,
downloadManager: DownloadManager /* SY --> */, downloadManager: DownloadManager,
mergedManga: Map<Long, Manga>, /* SY <-- */ // SY -->
mergedManga: Map<Long, Manga>,
// SY <--
): Chapter? { ): Chapter? {
return applyFilters(manga, downloadManager/* SY --> */, mergedManga/* SY <-- */).let { chapters -> return applyFilters(manga, downloadManager/* SY --> */, mergedManga/* SY <-- */).let { chapters ->
// SY --> // SY -->

View file

@ -4,6 +4,7 @@ import android.graphics.Color
import dev.icerock.moko.resources.StringResource import dev.icerock.moko.resources.StringResource
import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.R
import eu.kanade.tachiyomi.data.track.Tracker import eu.kanade.tachiyomi.data.track.Tracker
import eu.kanade.tachiyomi.data.track.model.TrackMangaMetadata
import eu.kanade.tachiyomi.data.track.model.TrackSearch import eu.kanade.tachiyomi.data.track.model.TrackSearch
import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.ImmutableList
import kotlinx.collections.immutable.toImmutableList import kotlinx.collections.immutable.toImmutableList
@ -121,10 +122,8 @@ data class DummyTracker(
) = Unit ) = Unit
override suspend fun getMangaMetadata( override suspend fun getMangaMetadata(
track: tachiyomi.domain.track.model.Track, track: Track,
): eu.kanade.tachiyomi.data.track.model.TrackMangaMetadata = eu.kanade.tachiyomi.data.track.model.TrackMangaMetadata( ): TrackMangaMetadata = TrackMangaMetadata(0, "test", "test", "test", "test", "test")
0, "test", "test", "test", "test", "test",
)
// KMK --> // KMK -->
override fun hasNotStartedReading(status: Long): Boolean = status == 2L override fun hasNotStartedReading(status: Long): Boolean = status == 2L

View file

@ -400,15 +400,9 @@ class FavoritesSyncHelper(val context: Context) {
} }
val error = when (result) { val error = when (result) {
is GalleryAddEvent.Fail.Error -> FavoritesSyncStatus.SyncError.GallerySyncError.GalleryAddFail( is GalleryAddEvent.Fail.Error -> FavoritesSyncStatus.SyncError.GallerySyncError.GalleryAddFail(it.title, result.logMessage)
it.title, result.logMessage, is GalleryAddEvent.Fail.UnknownType -> FavoritesSyncStatus.SyncError.GallerySyncError.InvalidGalleryFail(it.title, result.galleryUrl)
) is GalleryAddEvent.Fail.UnknownSource -> FavoritesSyncStatus.SyncError.GallerySyncError.InvalidGalleryFail(it.title, result.galleryUrl)
is GalleryAddEvent.Fail.UnknownType -> FavoritesSyncStatus.SyncError.GallerySyncError.InvalidGalleryFail(
it.title, result.galleryUrl,
)
is GalleryAddEvent.Fail.UnknownSource -> FavoritesSyncStatus.SyncError.GallerySyncError.InvalidGalleryFail(
it.title, result.galleryUrl,
)
} }
if (prefs.exhLenientSync().get()) { if (prefs.exhLenientSync().get()) {

View file

@ -34,7 +34,8 @@ class SimilarHandler(
} }
return MetadataMangasPage( return MetadataMangasPage(
mangaList, false, mangaList,
false,
List(mangaList.size) { List(mangaList.size) {
MangaDexSearchMetadata().also { it.relation = MangaDexRelation.SIMILAR } MangaDexSearchMetadata().also { it.relation = MangaDexRelation.SIMILAR }
}, },

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package exh.md.utils package exh.md.utils
object MdApi { object MdApi {

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package exh.md.utils package exh.md.utils
import android.util.Base64 import android.util.Base64

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package exh.md.utils package exh.md.utils
import android.app.Application import android.app.Application

View file

@ -22,7 +22,9 @@ import tachiyomi.domain.manga.model.Manga
import tachiyomi.i18n.sy.SYMR import tachiyomi.i18n.sy.SYMR
class AniListPagingSource(manga: Manga, source: CatalogueSource?) : TrackerRecommendationPagingSource( class AniListPagingSource(manga: Manga, source: CatalogueSource?) : TrackerRecommendationPagingSource(
"https://graphql.anilist.co/", source, manga, "https://graphql.anilist.co/",
source,
manga,
) { ) {
override val name: String override val name: String
get() = "AniList" get() = "AniList"

View file

@ -24,7 +24,9 @@ import tachiyomi.domain.manga.model.Manga
import tachiyomi.i18n.sy.SYMR import tachiyomi.i18n.sy.SYMR
abstract class MangaUpdatesPagingSource(manga: Manga, source: CatalogueSource?) : TrackerRecommendationPagingSource( abstract class MangaUpdatesPagingSource(manga: Manga, source: CatalogueSource?) : TrackerRecommendationPagingSource(
"https://api.mangaupdates.com/v1/", source, manga, "https://api.mangaupdates.com/v1/",
source,
manga,
) { ) {
override val name: String override val name: String
get() = "MangaUpdates" get() = "MangaUpdates"

View file

@ -18,7 +18,9 @@ import tachiyomi.domain.manga.model.Manga
import tachiyomi.i18n.sy.SYMR import tachiyomi.i18n.sy.SYMR
class MyAnimeListPagingSource(manga: Manga, source: CatalogueSource?) : TrackerRecommendationPagingSource( class MyAnimeListPagingSource(manga: Manga, source: CatalogueSource?) : TrackerRecommendationPagingSource(
"https://api.jikan.moe/v4/", source, manga, "https://api.jikan.moe/v4/",
source,
manga,
) { ) {
override val name: String override val name: String
get() = "MyAnimeList" get() = "MyAnimeList"

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package exh.source package exh.source
object BlacklistedSources { object BlacklistedSources {

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package mihon.core.archive package mihon.core.archive
import android.security.keystore.KeyGenParameterSpec import android.security.keystore.KeyGenParameterSpec

View file

@ -20,8 +20,7 @@ import java.util.concurrent.TimeUnit
import kotlin.math.pow import kotlin.math.pow
import kotlin.random.Random import kotlin.random.Random
/* SY --> */ /* SY --> */ open /* SY <-- */ class NetworkHelper(
open /* SY <-- */ class NetworkHelper(
private val context: Context, private val context: Context,
private val preferences: NetworkPreferences, private val preferences: NetworkPreferences,
// SY --> // SY -->
@ -29,11 +28,9 @@ open /* SY <-- */ class NetworkHelper(
// SY <-- // SY <--
) { ) {
/* SY --> */ /* SY --> */ open /* SY <-- */val cookieJar = AndroidCookieJar()
open /* SY <-- */val cookieJar = AndroidCookieJar()
/* SY --> */ /* SY --> */ open /* SY <-- */val client: OkHttpClient =
open /* SY <-- */val client: OkHttpClient =
// KMK --> // KMK -->
clientWithTimeOut() clientWithTimeOut()

View file

@ -1,3 +1,5 @@
@file:Suppress("PropertyName")
package exh.source package exh.source
import eu.kanade.tachiyomi.source.Source import eu.kanade.tachiyomi.source.Source

View file

@ -2,8 +2,7 @@ package eu.kanade.tachiyomi.source.model
import exh.metadata.metadata.RaisedSearchMetadata import exh.metadata.metadata.RaisedSearchMetadata
/* SY --> */ /* SY --> */ open /* SY <-- */ class MangasPage(open val mangas: List<SManga>, open val hasNextPage: Boolean) {
open /* SY <-- */ class MangasPage(open val mangas: List<SManga>, open val hasNextPage: Boolean) {
// SY --> // SY -->
override fun equals(other: Any?): Boolean { override fun equals(other: Any?): Boolean {
if (this === other) return true if (this === other) return true

View file

@ -95,8 +95,7 @@ abstract class HttpSource : CatalogueSource {
/** /**
* Headers used for requests. * Headers used for requests.
*/ */
/* SY --> */ /* SY --> */ open /* SY <-- */ val headers: Headers by lazy { headersBuilder().build() }
open /* SY <-- */ val headers: Headers by lazy { headersBuilder().build() }
/** /**
* Default network client for doing requests. * Default network client for doing requests.

View file

@ -95,10 +95,12 @@ actual class LocalSource(
// Filter out files that are hidden and is not a folder // Filter out files that are hidden and is not a folder
.filter { .filter {
it.isDirectory && it.isDirectory &&
/* SY --> */ ( // SY -->
(
!it.name.orEmpty().startsWith('.') || !it.name.orEmpty().startsWith('.') ||
allowLocalSourceHiddenFolders allowLocalSourceHiddenFolders
) /* SY <-- */ )
// SY <--
} }
.distinctBy { it.name } .distinctBy { it.name }
.filter { .filter {