From 333d1c1ad983f89fd92e857d94f93037a26a81b7 Mon Sep 17 00:00:00 2001 From: arkon Date: Sat, 23 May 2020 18:58:05 -0400 Subject: [PATCH] Remove explicit "SELECT" button from migration source list --- .../ui/browse/migration/MigrationController.kt | 7 +------ .../tachiyomi/ui/browse/migration/SourceAdapter.kt | 12 ------------ .../tachiyomi/ui/browse/migration/SourceHolder.kt | 6 +----- app/src/main/res/values/strings.xml | 3 +-- 4 files changed, 3 insertions(+), 25 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/MigrationController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/MigrationController.kt index 2b94d56941..0c4748c834 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/MigrationController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/MigrationController.kt @@ -14,8 +14,7 @@ import eu.kanade.tachiyomi.ui.browse.source.SourceDividerItemDecoration class MigrationController : NucleusController(), - FlexibleAdapter.OnItemClickListener, - SourceAdapter.OnSelectClickListener { + FlexibleAdapter.OnItemClickListener { private var adapter: FlexibleAdapter>? = null @@ -94,8 +93,4 @@ class MigrationController : } return false } - - override fun onSelectClick(position: Int) { - onItemClick(view!!, position) - } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/SourceAdapter.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/SourceAdapter.kt index 7711fcc24a..a556eafbfb 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/SourceAdapter.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/SourceAdapter.kt @@ -21,18 +21,6 @@ class SourceAdapter(val controller: MigrationController) : setDisplayHeadersAtStartUp(true) } - /** - * Listener for browse item clicks. - */ - val selectClickListener: OnSelectClickListener? = controller - - /** - * Listener which should be called when user clicks select. - */ - interface OnSelectClickListener { - fun onSelectClick(position: Int) - } - override fun updateDataSet(items: MutableList>?) { if (this.items !== items) { this.items = items diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/SourceHolder.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/SourceHolder.kt index a96848b9c5..04ef0c752a 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/SourceHolder.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/browse/migration/SourceHolder.kt @@ -1,7 +1,6 @@ package eu.kanade.tachiyomi.ui.browse.migration import android.view.View -import eu.kanade.tachiyomi.R import eu.kanade.tachiyomi.source.icon import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder import eu.kanade.tachiyomi.ui.base.holder.SlicedHolder @@ -26,10 +25,7 @@ class SourceHolder(view: View, override val adapter: SourceAdapter) : init { source_latest.gone() - source_browse.setText(R.string.select) - source_browse.setOnClickListener { - adapter.selectClickListener?.onSelectClick(bindingAdapterPosition) - } + source_browse.gone() } fun bind(item: SourceItem) { diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index e7d28cd5ac..bf6965bca3 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -20,7 +20,7 @@ Sources Categories Backup - Migration + Migrate Extensions Extension info Help @@ -566,7 +566,6 @@ Tap to select the source to migrate from Select data to include Select a source to migrate from - Select Migrate Copy