mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-15 21:47:28 +01:00
Update linter
This commit is contained in:
@@ -43,7 +43,7 @@ class AppModule(val app: Application) : InjektModule {
|
||||
.callback(DbOpenCallback())
|
||||
.name(DbOpenCallback.DATABASE_NAME)
|
||||
.noBackupDirectory(false)
|
||||
.build()
|
||||
.build(),
|
||||
)
|
||||
}
|
||||
|
||||
@@ -56,11 +56,11 @@ class AppModule(val app: Application) : InjektModule {
|
||||
driver = get(),
|
||||
historyAdapter = History.Adapter(
|
||||
history_last_readAdapter = dateAdapter,
|
||||
history_time_readAdapter = dateAdapter
|
||||
history_time_readAdapter = dateAdapter,
|
||||
),
|
||||
mangasAdapter = Mangas.Adapter(
|
||||
genreAdapter = listOfStringsAdapter
|
||||
)
|
||||
genreAdapter = listOfStringsAdapter,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ class DbOpenCallback : SupportSQLiteOpenHelper.Callback(Database.Schema.version)
|
||||
Database.Schema.migrate(
|
||||
driver = AndroidSqliteDriver(database = db, cacheSize = 1),
|
||||
oldVersion = oldVersion,
|
||||
newVersion = newVersion
|
||||
newVersion = newVersion,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ class MigrationMangaController : ComposeController<MigrationMangaPresenter> {
|
||||
},
|
||||
onClickCover = {
|
||||
router.pushController(MangaController(it.id))
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ import uy.kohesive.injekt.api.get
|
||||
|
||||
class MigrationMangaPresenter(
|
||||
private val sourceId: Long,
|
||||
private val getFavoritesBySourceId: GetFavoritesBySourceId = Injekt.get()
|
||||
private val getFavoritesBySourceId: GetFavoritesBySourceId = Injekt.get(),
|
||||
) : BasePresenter<MigrationMangaController>() {
|
||||
|
||||
private val _state: MutableStateFlow<MigrateMangaState> = MutableStateFlow(MigrateMangaState.Loading)
|
||||
|
||||
@@ -28,7 +28,7 @@ class SearchController(
|
||||
constructor(mangaId: Long) : this(
|
||||
Injekt.get<DatabaseHelper>()
|
||||
.getManga(mangaId)
|
||||
.executeAsBlocking()
|
||||
.executeAsBlocking(),
|
||||
)
|
||||
|
||||
private var newManga: Manga? = null
|
||||
|
||||
@@ -30,8 +30,8 @@ class MigrationSourcesController : ComposeController<MigrationSourcesPresenter>(
|
||||
parentController!!.router.pushController(
|
||||
MigrationMangaController(
|
||||
source.id,
|
||||
source.name
|
||||
)
|
||||
source.name,
|
||||
),
|
||||
)
|
||||
},
|
||||
onLongClickItem = { source ->
|
||||
@@ -51,12 +51,14 @@ class MigrationSourcesController : ComposeController<MigrationSourcesPresenter>(
|
||||
true
|
||||
}
|
||||
R.id.asc_alphabetical,
|
||||
R.id.desc_alphabetical -> {
|
||||
R.id.desc_alphabetical,
|
||||
-> {
|
||||
presenter.setAlphabeticalSorting(itemId == R.id.asc_alphabetical)
|
||||
true
|
||||
}
|
||||
R.id.asc_count,
|
||||
R.id.desc_count -> {
|
||||
R.id.desc_count,
|
||||
-> {
|
||||
presenter.setTotalSorting(itemId == R.id.asc_count)
|
||||
true
|
||||
}
|
||||
|
||||
@@ -16,7 +16,7 @@ import uy.kohesive.injekt.api.get
|
||||
|
||||
class MigrationSourcesPresenter(
|
||||
private val getSourcesWithFavoriteCount: GetSourcesWithFavoriteCount = Injekt.get(),
|
||||
private val setMigrateSorting: SetMigrateSorting = Injekt.get()
|
||||
private val setMigrateSorting: SetMigrateSorting = Injekt.get(),
|
||||
) : BasePresenter<MigrationSourcesController>() {
|
||||
|
||||
private val _state: MutableStateFlow<MigrateSourceState> = MutableStateFlow(MigrateSourceState.Loading)
|
||||
|
||||
@@ -20,7 +20,7 @@ class SourceFilterPresenter(
|
||||
private val getLanguagesWithSources: GetLanguagesWithSources = Injekt.get(),
|
||||
private val toggleSource: ToggleSource = Injekt.get(),
|
||||
private val toggleLanguage: ToggleLanguage = Injekt.get(),
|
||||
private val preferences: PreferencesHelper = Injekt.get()
|
||||
private val preferences: PreferencesHelper = Injekt.get(),
|
||||
) : BasePresenter<SourceFilterController>() {
|
||||
|
||||
private val _state: MutableStateFlow<SourceFilterState> = MutableStateFlow(SourceFilterState.Loading)
|
||||
@@ -49,7 +49,7 @@ class SourceFilterPresenter(
|
||||
header + it.value.map { source ->
|
||||
FilterUiModel.Item(
|
||||
source,
|
||||
source.id.toString() !in preferences.disabledSources().get()
|
||||
source.id.toString() !in preferences.disabledSources().get(),
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.TreeMap
|
||||
class SourcePresenter(
|
||||
private val getEnabledSources: GetEnabledSources = Injekt.get(),
|
||||
private val toggleSource: ToggleSource = Injekt.get(),
|
||||
private val toggleSourcePin: ToggleSourcePin = Injekt.get()
|
||||
private val toggleSourcePin: ToggleSourcePin = Injekt.get(),
|
||||
) : BasePresenter<SourceController>() {
|
||||
|
||||
private val _state: MutableStateFlow<SourceState> = MutableStateFlow(SourceState.Loading)
|
||||
|
||||
@@ -25,7 +25,7 @@ fun syncChaptersWithSource(
|
||||
db: DatabaseHelper,
|
||||
rawSourceChapters: List<SChapter>,
|
||||
manga: Manga,
|
||||
source: Source
|
||||
source: Source,
|
||||
): Pair<List<Chapter>, List<Chapter>> {
|
||||
if (rawSourceChapters.isEmpty()) {
|
||||
throw NoChaptersException()
|
||||
|
||||
@@ -91,7 +91,7 @@ class TachiyomiBottomNavigationView @JvmOverloads constructor(
|
||||
currentAnimator = null
|
||||
postInvalidate()
|
||||
}
|
||||
})
|
||||
},)
|
||||
}
|
||||
|
||||
internal class SavedState : AbsSavedState {
|
||||
|
||||
@@ -25,7 +25,7 @@ class ThemesPreferenceAdapter(private val clickListener: OnItemClickListener) :
|
||||
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ThemeViewHolder {
|
||||
val themeResIds = ThemingDelegate.getThemeResIds(themes[viewType], preferences.themeDarkAmoled().get())
|
||||
val themedContext = themeResIds.fold(parent.context) {
|
||||
context, themeResId ->
|
||||
context, themeResId ->
|
||||
ContextThemeWrapper(context, themeResId)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user