mirror of
https://github.com/tachiyomiorg/tachiyomi.git
synced 2024-12-23 04:21:52 +01:00
Remove explicit "SELECT" button from migration source list
This commit is contained in:
parent
4e027cec71
commit
333d1c1ad9
@ -14,8 +14,7 @@ import eu.kanade.tachiyomi.ui.browse.source.SourceDividerItemDecoration
|
|||||||
|
|
||||||
class MigrationController :
|
class MigrationController :
|
||||||
NucleusController<MigrationControllerBinding, MigrationPresenter>(),
|
NucleusController<MigrationControllerBinding, MigrationPresenter>(),
|
||||||
FlexibleAdapter.OnItemClickListener,
|
FlexibleAdapter.OnItemClickListener {
|
||||||
SourceAdapter.OnSelectClickListener {
|
|
||||||
|
|
||||||
private var adapter: FlexibleAdapter<IFlexible<*>>? = null
|
private var adapter: FlexibleAdapter<IFlexible<*>>? = null
|
||||||
|
|
||||||
@ -94,8 +93,4 @@ class MigrationController :
|
|||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSelectClick(position: Int) {
|
|
||||||
onItemClick(view!!, position)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -21,18 +21,6 @@ class SourceAdapter(val controller: MigrationController) :
|
|||||||
setDisplayHeadersAtStartUp(true)
|
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<*>>?) {
|
override fun updateDataSet(items: MutableList<IFlexible<*>>?) {
|
||||||
if (this.items !== items) {
|
if (this.items !== items) {
|
||||||
this.items = items
|
this.items = items
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
package eu.kanade.tachiyomi.ui.browse.migration
|
package eu.kanade.tachiyomi.ui.browse.migration
|
||||||
|
|
||||||
import android.view.View
|
import android.view.View
|
||||||
import eu.kanade.tachiyomi.R
|
|
||||||
import eu.kanade.tachiyomi.source.icon
|
import eu.kanade.tachiyomi.source.icon
|
||||||
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
import eu.kanade.tachiyomi.ui.base.holder.BaseFlexibleViewHolder
|
||||||
import eu.kanade.tachiyomi.ui.base.holder.SlicedHolder
|
import eu.kanade.tachiyomi.ui.base.holder.SlicedHolder
|
||||||
@ -26,10 +25,7 @@ class SourceHolder(view: View, override val adapter: SourceAdapter) :
|
|||||||
|
|
||||||
init {
|
init {
|
||||||
source_latest.gone()
|
source_latest.gone()
|
||||||
source_browse.setText(R.string.select)
|
source_browse.gone()
|
||||||
source_browse.setOnClickListener {
|
|
||||||
adapter.selectClickListener?.onSelectClick(bindingAdapterPosition)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun bind(item: SourceItem) {
|
fun bind(item: SourceItem) {
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
<string name="label_sources">Sources</string>
|
<string name="label_sources">Sources</string>
|
||||||
<string name="label_categories">Categories</string>
|
<string name="label_categories">Categories</string>
|
||||||
<string name="label_backup">Backup</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_extensions">Extensions</string>
|
||||||
<string name="label_extension_info">Extension info</string>
|
<string name="label_extension_info">Extension info</string>
|
||||||
<string name="label_help">Help</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_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_dialog_what_to_include">Select data to include</string>
|
||||||
<string name="migration_selection_prompt">Select a source to migrate from</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="migrate">Migrate</string>
|
||||||
<string name="copy">Copy</string>
|
<string name="copy">Copy</string>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user