Update linter
(cherry picked from commit f0eb42e72d)
# Conflicts:
# app/src/main/java/eu/kanade/tachiyomi/data/backup/full/FullBackupRestore.kt
# app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/Backup.kt
# app/src/main/java/eu/kanade/tachiyomi/data/backup/full/models/BackupManga.kt
# app/src/main/java/eu/kanade/tachiyomi/data/backup/legacy/models/Backup.kt
# app/src/main/java/eu/kanade/tachiyomi/extension/model/Extension.kt
# app/src/main/java/eu/kanade/tachiyomi/source/LocalSource.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/base/changehandler/OneWayFadeChangeHandler.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchController.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/search/SearchPresenter.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/sources/SelectionHeader.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourceItem.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/SourcePresenter.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/SourceFilterSheet.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/globalsearch/GlobalSearchController.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryHolder.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryListHolder.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryPresenter.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/manga/MangaPresenter.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/ReaderPageSheet.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/ChapterLoader.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/loader/HttpPageLoader.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/model/ReaderPage.kt
# app/src/main/java/eu/kanade/tachiyomi/ui/reader/viewer/pager/PagerPageHolder.kt
# app/src/main/java/eu/kanade/tachiyomi/util/view/ViewExtensions.kt
This commit is contained in:
@@ -18,7 +18,7 @@ import kotlin.coroutines.EmptyCoroutineContext
|
||||
|
||||
@Suppress("DEPRECATION", "unused")
|
||||
open class CoroutinePresenter<V>(
|
||||
scope: CoroutineScope = MainScope()
|
||||
scope: CoroutineScope = MainScope(),
|
||||
) : Presenter<V>(), CoroutineScope by scope {
|
||||
@Suppress("DeprecatedCallableAddReplaceWith")
|
||||
@Deprecated("Use launchInView, Flow.inView, Flow.mapView")
|
||||
|
||||
@@ -113,7 +113,7 @@ class BatchAddController : NucleusController<EhFragmentBatchAddBinding, BatchAdd
|
||||
get() = listOf(
|
||||
inputTitleView,
|
||||
galleriesBox,
|
||||
btnAddGalleries
|
||||
btnAddGalleries,
|
||||
)
|
||||
|
||||
private var List<View>.isVisible: Boolean
|
||||
|
||||
@@ -78,7 +78,7 @@ class BatchAddPresenter : BasePresenter<BatchAddController>() {
|
||||
is GalleryAddEvent.Success -> context.getString(R.string.batch_add_ok)
|
||||
is GalleryAddEvent.Fail -> context.getString(R.string.batch_add_error)
|
||||
}
|
||||
) + " " + result.logMessage
|
||||
) + " " + result.logMessage,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ class AutoSolvingWebViewClient(
|
||||
activity: BrowserActionActivity,
|
||||
verifyComplete: (String) -> Boolean,
|
||||
injectScript: String?,
|
||||
headers: Map<String, String>
|
||||
headers: Map<String, String>,
|
||||
) : HeadersInjectingWebViewClient(activity, verifyComplete, injectScript, headers) {
|
||||
|
||||
override fun shouldInterceptRequest(view: WebView, request: WebResourceRequest): WebResourceResponse? {
|
||||
@@ -25,7 +25,7 @@ class AutoSolvingWebViewClient(
|
||||
return WebResourceResponse(
|
||||
"text/html",
|
||||
"UTF-8",
|
||||
doc.toString().byteInputStream().buffered()
|
||||
doc.toString().byteInputStream().buffered(),
|
||||
)
|
||||
}
|
||||
return super.shouldInterceptRequest(view, request)
|
||||
|
||||
@@ -6,7 +6,7 @@ import android.webkit.WebViewClient
|
||||
open class BasicWebViewClient(
|
||||
protected val activity: BrowserActionActivity,
|
||||
protected val verifyComplete: (String) -> Boolean,
|
||||
private val injectScript: String?
|
||||
private val injectScript: String?,
|
||||
) : WebViewClient() {
|
||||
override fun onPageFinished(view: WebView, url: String) {
|
||||
super.onPageFinished(view, url)
|
||||
|
||||
@@ -155,7 +155,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
Request.Builder()
|
||||
// Rob demo credentials
|
||||
.url("https://speech-to-text-demo.ng.bluemix.net/api/v1/credentials")
|
||||
.build()
|
||||
.build(),
|
||||
)
|
||||
.asObservableSuccess()
|
||||
.subscribeOn(Schedulers.io())
|
||||
@@ -206,14 +206,14 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
{
|
||||
getAudioButtonLocation(loopId)
|
||||
},
|
||||
250
|
||||
250,
|
||||
)
|
||||
} else {
|
||||
binding.webview.postDelayed(
|
||||
{
|
||||
doStageCheckbox(loopId)
|
||||
},
|
||||
250
|
||||
250,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -236,7 +236,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
{
|
||||
getAudioButtonLocation(loopId)
|
||||
},
|
||||
250
|
||||
250,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -254,20 +254,20 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
it!!
|
||||
.replace(TRANSCRIPT_CLEANER_REGEX, "")
|
||||
.replace(SPACE_DEDUPE_REGEX, " ")
|
||||
.trim()
|
||||
.trim(),
|
||||
)
|
||||
}
|
||||
},
|
||||
{
|
||||
runBlocking { captchaSolveFail() }
|
||||
}
|
||||
},
|
||||
)
|
||||
} else {
|
||||
binding.webview.postDelayed(
|
||||
{
|
||||
doStageDownloadAudio(loopId)
|
||||
},
|
||||
250
|
||||
250,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -287,7 +287,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
httpClient.newCall(
|
||||
Request.Builder()
|
||||
.url(url)
|
||||
.build()
|
||||
.build(),
|
||||
).asObservableSuccess().map {
|
||||
token to it
|
||||
}
|
||||
@@ -300,7 +300,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
"https://stream.watsonplatform.net/speech-to-text/api/v1/recognize".toHttpUrlOrNull()!!
|
||||
.newBuilder()
|
||||
.addQueryParameter("watson-token", token)
|
||||
.build()
|
||||
.build(),
|
||||
)
|
||||
.post(
|
||||
MultipartBody.Builder()
|
||||
@@ -312,12 +312,12 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
audioFile.toRequestBody(
|
||||
"audio/mp3".toMediaTypeOrNull(),
|
||||
0,
|
||||
audioFile.size
|
||||
)
|
||||
audioFile.size,
|
||||
),
|
||||
)
|
||||
.build()
|
||||
.build(),
|
||||
)
|
||||
.build()
|
||||
.build(),
|
||||
).asObservableSuccess()
|
||||
}.map { response ->
|
||||
response.parseAs<JsonObject>()["results"]!!
|
||||
@@ -358,7 +358,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
}
|
||||
})();
|
||||
""".trimIndent().replace("\n", ""),
|
||||
null
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -393,7 +393,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
}
|
||||
})();
|
||||
""".trimIndent().replace("\n", ""),
|
||||
null
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -421,7 +421,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
}
|
||||
})();
|
||||
""".trimIndent().replace("\n", ""),
|
||||
null
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -452,7 +452,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
}
|
||||
})();
|
||||
""".trimIndent().replace("\n", ""),
|
||||
null
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -488,7 +488,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
{
|
||||
runValidateCaptcha(loopId)
|
||||
},
|
||||
250
|
||||
250,
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -520,7 +520,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
}
|
||||
})();
|
||||
""".trimIndent().replace("\n", ""),
|
||||
null
|
||||
null,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -685,7 +685,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
cookies: Map<String, String>,
|
||||
script: String?,
|
||||
url: String,
|
||||
autoSolveSubmitBtnSelector: String? = null
|
||||
autoSolveSubmitBtnSelector: String? = null,
|
||||
) {
|
||||
val intent = baseIntent(context).apply {
|
||||
putExtra(SOURCE_ID_EXTRA, source.id)
|
||||
@@ -701,7 +701,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
fun launchUniversal(
|
||||
context: Context,
|
||||
source: HttpSource,
|
||||
url: String
|
||||
url: String,
|
||||
) {
|
||||
val intent = baseIntent(context).apply {
|
||||
putExtra(SOURCE_ID_EXTRA, source.id)
|
||||
@@ -714,7 +714,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
fun launchUniversal(
|
||||
context: Context,
|
||||
sourceId: Long,
|
||||
url: String
|
||||
url: String,
|
||||
) {
|
||||
val intent = baseIntent(context).apply {
|
||||
putExtra(SOURCE_ID_EXTRA, sourceId)
|
||||
@@ -729,7 +729,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
completionVerifier: ActionCompletionVerifier,
|
||||
script: String?,
|
||||
url: String,
|
||||
actionName: String
|
||||
actionName: String,
|
||||
) {
|
||||
val intent = baseIntent(context).apply {
|
||||
putExtra(SOURCE_ID_EXTRA, completionVerifier.id)
|
||||
@@ -747,7 +747,7 @@ class BrowserActionActivity : AppCompatActivity() {
|
||||
script: String?,
|
||||
url: String,
|
||||
actionName: String,
|
||||
headers: Map<String, String>? = emptyMap()
|
||||
headers: Map<String, String>? = emptyMap(),
|
||||
) {
|
||||
val intent = baseIntent(context).apply {
|
||||
putExtra(HEADERS_EXTRA, HashMap(headers!!))
|
||||
|
||||
@@ -8,7 +8,7 @@ open class HeadersInjectingWebViewClient(
|
||||
activity: BrowserActionActivity,
|
||||
verifyComplete: (String) -> Boolean,
|
||||
injectScript: String?,
|
||||
private val headers: Map<String, String>
|
||||
private val headers: Map<String, String>,
|
||||
) : BasicWebViewClient(activity, verifyComplete, injectScript) {
|
||||
|
||||
override fun shouldInterceptRequest(view: WebView, request: WebResourceRequest): WebResourceResponse? {
|
||||
@@ -72,7 +72,7 @@ open class HeadersInjectingWebViewClient(
|
||||
502 to "Bad Gateway",
|
||||
503 to "Service Unavailable",
|
||||
504 to "Gateway Time-out",
|
||||
505 to "HTTP Version not supported"
|
||||
505 to "HTTP Version not supported",
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ class InterceptActivity : BaseActivity() {
|
||||
.setAction(MainActivity.SHORTCUT_MANGA)
|
||||
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP)
|
||||
.putExtra(MangaController.MANGA_EXTRA, it.mangaId)
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
is InterceptResult.Failure -> {
|
||||
|
||||
@@ -214,8 +214,10 @@ class EhLoginActivity : BaseActivity() {
|
||||
fun checkLoginCookies(url: String): Boolean {
|
||||
getCookies(url)?.let { parsed ->
|
||||
return parsed.count {
|
||||
(it.name.equals(MEMBER_ID_COOKIE, ignoreCase = true) ||
|
||||
it.name.equals(PASS_HASH_COOKIE, ignoreCase = true)) &&
|
||||
(
|
||||
it.name.equals(MEMBER_ID_COOKIE, ignoreCase = true) ||
|
||||
it.name.equals(PASS_HASH_COOKIE, ignoreCase = true)
|
||||
) &&
|
||||
it.value.isNotBlank()
|
||||
} >= 2
|
||||
}
|
||||
|
||||
@@ -20,8 +20,8 @@ import uy.kohesive.injekt.api.get
|
||||
class MetadataViewController : NucleusController<MetadataViewControllerBinding, MetadataViewPresenter> {
|
||||
constructor(manga: Manga?) : super(
|
||||
bundleOf(
|
||||
MangaController.MANGA_EXTRA to (manga?.id ?: 0)
|
||||
)
|
||||
MangaController.MANGA_EXTRA to (manga?.id ?: 0),
|
||||
),
|
||||
) {
|
||||
this.manga = manga
|
||||
if (manga != null) {
|
||||
@@ -30,7 +30,7 @@ class MetadataViewController : NucleusController<MetadataViewControllerBinding,
|
||||
}
|
||||
|
||||
constructor(mangaId: Long) : this(
|
||||
Injekt.get<DatabaseHelper>().getManga(mangaId).executeAsBlocking()
|
||||
Injekt.get<DatabaseHelper>().getManga(mangaId).executeAsBlocking(),
|
||||
)
|
||||
|
||||
@Suppress("unused")
|
||||
@@ -50,7 +50,7 @@ class MetadataViewController : NucleusController<MetadataViewControllerBinding,
|
||||
override fun createPresenter(): MetadataViewPresenter {
|
||||
return MetadataViewPresenter(
|
||||
manga!!,
|
||||
source!!
|
||||
source!!,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ class MetadataViewPresenter(
|
||||
val manga: Manga,
|
||||
val source: Source,
|
||||
val preferences: PreferencesHelper = Injekt.get(),
|
||||
private val db: DatabaseHelper = Injekt.get()
|
||||
private val db: DatabaseHelper = Injekt.get(),
|
||||
) : CoroutinePresenter<MetadataViewController>() {
|
||||
|
||||
val meta = MutableStateFlow<RaisedSearchMetadata?>(null)
|
||||
|
||||
@@ -16,7 +16,7 @@ import exh.metadata.metadata.EHentaiSearchMetadata
|
||||
import exh.ui.metadata.MetadataViewController
|
||||
|
||||
class EHentaiDescriptionAdapter(
|
||||
private val controller: MangaController
|
||||
private val controller: MangaController,
|
||||
) :
|
||||
RecyclerView.Adapter<EHentaiDescriptionAdapter.EHentaiDescriptionViewHolder>() {
|
||||
|
||||
@@ -82,12 +82,12 @@ class EHentaiDescriptionAdapter(
|
||||
binding.pages,
|
||||
binding.rating,
|
||||
binding.uploader,
|
||||
binding.visible
|
||||
binding.visible,
|
||||
).forEach { textView ->
|
||||
textView.setOnLongClickListener {
|
||||
itemView.context.copyToClipboard(
|
||||
textView.text.toString(),
|
||||
textView.text.toString()
|
||||
textView.text.toString(),
|
||||
)
|
||||
true
|
||||
}
|
||||
@@ -100,8 +100,8 @@ class EHentaiDescriptionAdapter(
|
||||
binding.moreInfo.setOnClickListener {
|
||||
controller.router?.pushController(
|
||||
MetadataViewController(
|
||||
controller.manga
|
||||
).withFadeTransaction()
|
||||
controller.manga,
|
||||
).withFadeTransaction(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import exh.metadata.metadata.EightMusesSearchMetadata
|
||||
import exh.ui.metadata.MetadataViewController
|
||||
|
||||
class EightMusesDescriptionAdapter(
|
||||
private val controller: MangaController
|
||||
private val controller: MangaController,
|
||||
) :
|
||||
RecyclerView.Adapter<EightMusesDescriptionAdapter.EightMusesDescriptionViewHolder>() {
|
||||
|
||||
@@ -43,7 +43,7 @@ class EightMusesDescriptionAdapter(
|
||||
binding.title.setOnLongClickListener {
|
||||
itemView.context.copyToClipboard(
|
||||
binding.title.text.toString(),
|
||||
binding.title.text.toString()
|
||||
binding.title.text.toString(),
|
||||
)
|
||||
true
|
||||
}
|
||||
@@ -51,8 +51,8 @@ class EightMusesDescriptionAdapter(
|
||||
binding.moreInfo.setOnClickListener {
|
||||
controller.router?.pushController(
|
||||
MetadataViewController(
|
||||
controller.manga
|
||||
).withFadeTransaction()
|
||||
controller.manga,
|
||||
).withFadeTransaction(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ import exh.metadata.metadata.HBrowseSearchMetadata
|
||||
import exh.ui.metadata.MetadataViewController
|
||||
|
||||
class HBrowseDescriptionAdapter(
|
||||
private val controller: MangaController
|
||||
private val controller: MangaController,
|
||||
) :
|
||||
RecyclerView.Adapter<HBrowseDescriptionAdapter.HBrowseDescriptionViewHolder>() {
|
||||
|
||||
@@ -44,7 +44,7 @@ class HBrowseDescriptionAdapter(
|
||||
binding.pages.setOnLongClickListener {
|
||||
itemView.context.copyToClipboard(
|
||||
binding.pages.text.toString(),
|
||||
binding.pages.text.toString()
|
||||
binding.pages.text.toString(),
|
||||
)
|
||||
true
|
||||
}
|
||||
@@ -52,8 +52,8 @@ class HBrowseDescriptionAdapter(
|
||||
binding.moreInfo.setOnClickListener {
|
||||
controller.router?.pushController(
|
||||
MetadataViewController(
|
||||
controller.manga
|
||||
).withFadeTransaction()
|
||||
controller.manga,
|
||||
).withFadeTransaction(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import exh.ui.metadata.MetadataViewController
|
||||
import java.util.Date
|
||||
|
||||
class HitomiDescriptionAdapter(
|
||||
private val controller: MangaController
|
||||
private val controller: MangaController,
|
||||
) :
|
||||
RecyclerView.Adapter<HitomiDescriptionAdapter.HitomiDescriptionViewHolder>() {
|
||||
|
||||
@@ -51,12 +51,12 @@ class HitomiDescriptionAdapter(
|
||||
listOf(
|
||||
binding.genre,
|
||||
binding.language,
|
||||
binding.whenPosted
|
||||
binding.whenPosted,
|
||||
).forEach { textView ->
|
||||
textView.setOnLongClickListener {
|
||||
itemView.context.copyToClipboard(
|
||||
textView.text.toString(),
|
||||
textView.text.toString()
|
||||
textView.text.toString(),
|
||||
)
|
||||
true
|
||||
}
|
||||
@@ -65,8 +65,8 @@ class HitomiDescriptionAdapter(
|
||||
binding.moreInfo.setOnClickListener {
|
||||
controller.router?.pushController(
|
||||
MetadataViewController(
|
||||
controller.manga
|
||||
).withFadeTransaction()
|
||||
controller.manga,
|
||||
).withFadeTransaction(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import exh.ui.metadata.MetadataViewController
|
||||
import kotlin.math.round
|
||||
|
||||
class MangaDexDescriptionAdapter(
|
||||
private val controller: MangaController
|
||||
private val controller: MangaController,
|
||||
) :
|
||||
RecyclerView.Adapter<MangaDexDescriptionAdapter.MangaDexDescriptionViewHolder>() {
|
||||
|
||||
@@ -54,7 +54,7 @@ class MangaDexDescriptionAdapter(
|
||||
binding.rating.setOnLongClickListener {
|
||||
itemView.context.copyToClipboard(
|
||||
binding.rating.text.toString(),
|
||||
binding.rating.text.toString()
|
||||
binding.rating.text.toString(),
|
||||
)
|
||||
true
|
||||
}
|
||||
@@ -62,8 +62,8 @@ class MangaDexDescriptionAdapter(
|
||||
binding.moreInfo.setOnClickListener {
|
||||
controller.router?.pushController(
|
||||
MetadataViewController(
|
||||
controller.manga
|
||||
).withFadeTransaction()
|
||||
controller.manga,
|
||||
).withFadeTransaction(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import exh.ui.metadata.MetadataViewController
|
||||
import java.util.Date
|
||||
|
||||
class NHentaiDescriptionAdapter(
|
||||
private val controller: MangaController
|
||||
private val controller: MangaController,
|
||||
) :
|
||||
RecyclerView.Adapter<NHentaiDescriptionAdapter.NHentaiDescriptionViewHolder>() {
|
||||
|
||||
@@ -70,12 +70,12 @@ class NHentaiDescriptionAdapter(
|
||||
binding.genre,
|
||||
binding.id,
|
||||
binding.pages,
|
||||
binding.whenPosted
|
||||
binding.whenPosted,
|
||||
).forEach { textView ->
|
||||
textView.setOnLongClickListener {
|
||||
itemView.context.copyToClipboard(
|
||||
textView.text.toString(),
|
||||
textView.text.toString()
|
||||
textView.text.toString(),
|
||||
)
|
||||
true
|
||||
}
|
||||
@@ -84,8 +84,8 @@ class NHentaiDescriptionAdapter(
|
||||
binding.moreInfo.setOnClickListener {
|
||||
controller.router?.pushController(
|
||||
MetadataViewController(
|
||||
controller.manga
|
||||
).withFadeTransaction()
|
||||
controller.manga,
|
||||
).withFadeTransaction(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.Locale
|
||||
import kotlin.math.round
|
||||
|
||||
class PervEdenDescriptionAdapter(
|
||||
private val controller: MangaController
|
||||
private val controller: MangaController,
|
||||
) :
|
||||
RecyclerView.Adapter<PervEdenDescriptionAdapter.PervEdenDescriptionViewHolder>() {
|
||||
|
||||
@@ -60,12 +60,12 @@ class PervEdenDescriptionAdapter(
|
||||
listOf(
|
||||
binding.genre,
|
||||
binding.language,
|
||||
binding.rating
|
||||
binding.rating,
|
||||
).forEach { textView ->
|
||||
textView.setOnLongClickListener {
|
||||
itemView.context.copyToClipboard(
|
||||
textView.text.toString(),
|
||||
textView.text.toString()
|
||||
textView.text.toString(),
|
||||
)
|
||||
true
|
||||
}
|
||||
@@ -74,8 +74,8 @@ class PervEdenDescriptionAdapter(
|
||||
binding.moreInfo.setOnClickListener {
|
||||
controller.router?.pushController(
|
||||
MetadataViewController(
|
||||
controller.manga
|
||||
).withFadeTransaction()
|
||||
controller.manga,
|
||||
).withFadeTransaction(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import exh.ui.metadata.MetadataViewController
|
||||
import kotlin.math.round
|
||||
|
||||
class PururinDescriptionAdapter(
|
||||
private val controller: MangaController
|
||||
private val controller: MangaController,
|
||||
) :
|
||||
RecyclerView.Adapter<PururinDescriptionAdapter.PururinDescriptionViewHolder>() {
|
||||
|
||||
@@ -66,12 +66,12 @@ class PururinDescriptionAdapter(
|
||||
binding.pages,
|
||||
binding.rating,
|
||||
binding.size,
|
||||
binding.uploader
|
||||
binding.uploader,
|
||||
).forEach { textView ->
|
||||
textView.setOnLongClickListener {
|
||||
itemView.context.copyToClipboard(
|
||||
textView.text.toString(),
|
||||
textView.text.toString()
|
||||
textView.text.toString(),
|
||||
)
|
||||
true
|
||||
}
|
||||
@@ -80,8 +80,8 @@ class PururinDescriptionAdapter(
|
||||
binding.moreInfo.setOnClickListener {
|
||||
controller.router?.pushController(
|
||||
MetadataViewController(
|
||||
controller.manga
|
||||
).withFadeTransaction()
|
||||
controller.manga,
|
||||
).withFadeTransaction(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ import java.util.Date
|
||||
import kotlin.math.round
|
||||
|
||||
class TsuminoDescriptionAdapter(
|
||||
private val controller: MangaController
|
||||
private val controller: MangaController,
|
||||
) :
|
||||
RecyclerView.Adapter<TsuminoDescriptionAdapter.TsuminoDescriptionViewHolder>() {
|
||||
|
||||
@@ -67,12 +67,12 @@ class TsuminoDescriptionAdapter(
|
||||
binding.pages,
|
||||
binding.rating,
|
||||
binding.uploader,
|
||||
binding.whenPosted
|
||||
binding.whenPosted,
|
||||
).forEach { textView ->
|
||||
textView.setOnLongClickListener {
|
||||
itemView.context.copyToClipboard(
|
||||
textView.text.toString(),
|
||||
textView.text.toString()
|
||||
textView.text.toString(),
|
||||
)
|
||||
true
|
||||
}
|
||||
@@ -81,8 +81,8 @@ class TsuminoDescriptionAdapter(
|
||||
binding.moreInfo.setOnClickListener {
|
||||
controller.router?.pushController(
|
||||
MetadataViewController(
|
||||
controller.manga
|
||||
).withFadeTransaction()
|
||||
controller.manga,
|
||||
).withFadeTransaction(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ class SmartSearchController(bundle: Bundle? = null) : NucleusController<EhSmartS
|
||||
|
||||
private val source = sourceManager.get(bundle?.getLong(ARG_SOURCE_ID, -1) ?: -1) as? CatalogueSource
|
||||
private val smartSearchConfig: SourceController.SmartSearchConfig? = bundle?.getParcelable(
|
||||
ARG_SMART_SEARCH_CONFIG
|
||||
ARG_SMART_SEARCH_CONFIG,
|
||||
)
|
||||
|
||||
override fun getTitle() = source?.name.orEmpty()
|
||||
@@ -55,7 +55,7 @@ class SmartSearchController(bundle: Bundle? = null) : NucleusController<EhSmartS
|
||||
val transaction = BrowseSourceController(
|
||||
source,
|
||||
smartSearchConfig.origTitle,
|
||||
smartSearchConfig
|
||||
smartSearchConfig,
|
||||
).withFadeTransaction()
|
||||
router.replaceTopController(transaction)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user