Remove explicit "SELECT" button from migration source list

This commit is contained in:
arkon 2020-05-23 18:58:05 -04:00
parent 4e027cec71
commit 333d1c1ad9
4 changed files with 3 additions and 25 deletions

View File

@ -14,8 +14,7 @@ import eu.kanade.tachiyomi.ui.browse.source.SourceDividerItemDecoration
class MigrationController :
NucleusController<MigrationControllerBinding, MigrationPresenter>(),
FlexibleAdapter.OnItemClickListener,
SourceAdapter.OnSelectClickListener {
FlexibleAdapter.OnItemClickListener {
private var adapter: FlexibleAdapter<IFlexible<*>>? = null
@ -94,8 +93,4 @@ class MigrationController :
}
return false
}
override fun onSelectClick(position: Int) {
onItemClick(view!!, position)
}
}

View File

@ -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<IFlexible<*>>?) {
if (this.items !== items) {
this.items = items

View File

@ -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) {

View File

@ -20,7 +20,7 @@
<string name="label_sources">Sources</string>
<string name="label_categories">Categories</string>
<string name="label_backup">Backup</string>
<string name="label_migration">Migration</string>
<string name="label_migration">Migrate</string>
<string name="label_extensions">Extensions</string>
<string name="label_extension_info">Extension info</string>
<string name="label_help">Help</string>
@ -566,7 +566,6 @@
<string name="migration_info">Tap to select the source to migrate from</string>
<string name="migration_dialog_what_to_include">Select data to include</string>
<string name="migration_selection_prompt">Select a source to migrate from</string>
<string name="select">Select</string>
<string name="migrate">Migrate</string>
<string name="copy">Copy</string>