Undo formatting changes

This commit is contained in:
Jobobby04 2020-05-26 17:15:23 -04:00
parent 04e8f0d77f
commit 7928c5f66d
7 changed files with 15 additions and 56 deletions

View File

@ -349,11 +349,7 @@ class MigrationListController(bundle: Bundle? = null) :
} else {
sources.filter { it.id != manga.source }
}
val searchController =
SearchController(
manga,
validSources
)
val searchController = SearchController(manga, validSources)
searchController.targetController = this@MigrationListController
router.pushController(searchController.withFadeTransaction())
}

View File

@ -18,10 +18,7 @@ class MangaItem(val manga: Manga) : AbstractFlexibleItem<MangaHolder>(), Parcela
}
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>): MangaHolder {
return MangaHolder(
view,
adapter
)
return MangaHolder(view, adapter)
}
override fun bindViewHolder(

View File

@ -56,18 +56,9 @@ class MigrationMangaPresenter(
replace: Boolean
) {
val flags = Injekt.get<PreferencesHelper>().migrateFlags().get()
val migrateChapters =
MigrationFlags.hasChapters(
flags
)
val migrateCategories =
MigrationFlags.hasCategories(
flags
)
val migrateTracks =
MigrationFlags.hasTracks(
flags
)
val migrateChapters = MigrationFlags.hasChapters(flags)
val migrateCategories = MigrationFlags.hasCategories(flags)
val migrateTracks = MigrationFlags.hasTracks(flags)
db.inTransaction {
// Update chapters read

View File

@ -52,11 +52,7 @@ class SearchController(
}
override fun createPresenter(): GlobalSearchPresenter {
return SearchPresenter(
initialQuery,
manga!!,
sources = sources
)
return SearchPresenter(initialQuery, manga!!, sources = sources)
}
override fun onSaveInstanceState(outState: Bundle) {
@ -91,8 +87,7 @@ class SearchController(
}*/
fun migrateManga() {
val target = targetController as? MigrationInterface
?: return
val target = targetController as? MigrationInterface ?: return
val manga = manga ?: return
val newManga = newManga ?: return
@ -101,8 +96,7 @@ class SearchController(
}
fun copyManga() {
val target = targetController as? MigrationInterface
?: return
val target = targetController as? MigrationInterface ?: return
val manga = manga ?: return
val newManga = newManga ?: return
@ -113,10 +107,7 @@ class SearchController(
private fun replaceWithNewSearchController(manga: Manga?) {
if (manga != null) {
// router.popCurrentController()
val searchController =
SearchController(
manga
)
val searchController = SearchController(manga)
searchController.targetController = targetController
searchController.progress = progress + 1
searchController.totalProgress = totalProgress
@ -134,8 +125,7 @@ class SearchController(
return
}
newManga = manga
val dialog =
MigrationDialog()
val dialog = MigrationDialog()
dialog.targetController = this
dialog.showDialog(router)
}
@ -152,10 +142,7 @@ class SearchController(
override fun onCreateDialog(savedViewState: Bundle?): Dialog {
val prefValue = preferences.migrateFlags().get()
val preselected =
MigrationFlags.getEnabledFlagsPositions(
prefValue
)
val preselected = MigrationFlags.getEnabledFlagsPositions(prefValue)
return MaterialDialog(activity!!)
.message(R.string.data_to_include_in_migration)
@ -164,10 +151,7 @@ class SearchController(
{ resources?.getString(it) as CharSequence },
initialSelection = preselected.toIntArray()
) { _, positions, _ ->
val newValue =
MigrationFlags.getFlagsFromPositions(
positions.toTypedArray()
)
val newValue = MigrationFlags.getFlagsFromPositions(positions.toTypedArray())
preferences.migrateFlags().set(newValue)
}
.positiveButton(R.string.migrate) {

View File

@ -25,10 +25,7 @@ class SelectionHeader : AbstractHeaderItem<SelectionHeader.Holder>() {
* Creates a new view holder for this item.
*/
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>): Holder {
return Holder(
view,
adapter
)
return Holder(view, adapter)
}
/**

View File

@ -28,10 +28,7 @@ data class SourceItem(val source: Source, val header: SelectionHeader) :
* Creates a new view holder for this item.
*/
override fun createViewHolder(view: View, adapter: FlexibleAdapter<IFlexible<RecyclerView.ViewHolder>>): SourceHolder {
return SourceHolder(
view,
adapter as SourceAdapter
)
return SourceHolder(view, adapter as SourceAdapter)
}
/**

View File

@ -429,10 +429,7 @@ class LibraryController(
}
}
R.id.action_source_migration -> {
router.pushController(
MigrationSourcesController()
.withFadeTransaction()
)
router.pushController(MigrationSourcesController().withFadeTransaction())
}
// --> EXH
R.id.action_sync_favorites -> {