Replace migrate button with merge
This commit is contained in:
parent
e7c16cd0d1
commit
e32f4eb317
@ -430,7 +430,6 @@ class MangaController :
|
||||
if (preferences.recommendsInOverflow().get()) menu.findItem(R.id.action_recommend).isVisible = true
|
||||
menu.findItem(R.id.action_merged).isVisible = presenter.manga.source == MERGED_SOURCE_ID
|
||||
menu.findItem(R.id.action_toggle_dedupe).isVisible = false // presenter.manga.source == MERGED_SOURCE_ID
|
||||
menu.findItem(R.id.action_merge).isVisible = presenter.manga.favorite
|
||||
// SY <--
|
||||
}
|
||||
|
||||
@ -464,8 +463,8 @@ class MangaController :
|
||||
presenter.dedupe = !presenter.dedupe
|
||||
presenter.toggleDedupe()
|
||||
}
|
||||
R.id.action_merge -> {
|
||||
openSmartSearch()
|
||||
R.id.action_migrate -> {
|
||||
migrateManga()
|
||||
}
|
||||
// SY <--
|
||||
|
||||
@ -966,7 +965,7 @@ class MangaController :
|
||||
/**
|
||||
* Initiates source migration for the specific manga.
|
||||
*/
|
||||
/* SY private */fun migrateManga() {
|
||||
private fun migrateManga() {
|
||||
// SY -->
|
||||
PreMigrationController.navigateToMigration(
|
||||
preferences.skipPreMigration().get(),
|
||||
|
@ -142,9 +142,9 @@ class MangaInfoHeaderAdapter(
|
||||
}
|
||||
|
||||
// SY -->
|
||||
binding.btnMigrate.isVisible = controller.presenter.manga.favorite
|
||||
binding.btnMigrate.clicks()
|
||||
.onEach { controller.migrateManga() }
|
||||
binding.btnMerge.isVisible = controller.presenter.manga.favorite
|
||||
binding.btnMerge.clicks()
|
||||
.onEach { controller.openSmartSearch() }
|
||||
.launchIn(scope)
|
||||
// SY <--
|
||||
|
||||
|
@ -169,20 +169,20 @@
|
||||
android:text="@string/action_web_view"
|
||||
android:visibility="gone"
|
||||
app:icon="@drawable/ic_public_24dp"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btn_migrate"
|
||||
app:layout_constraintEnd_toStartOf="@+id/btn_merge"
|
||||
app:layout_constraintStart_toEndOf="@+id/btn_tracking"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:visibility="visible" />
|
||||
|
||||
|
||||
<com.google.android.material.button.MaterialButton
|
||||
android:id="@+id/btn_migrate"
|
||||
android:id="@+id/btn_merge"
|
||||
style="@style/Theme.Widget.Button.Action"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:text="@string/migrate"
|
||||
android:text="@string/merge"
|
||||
android:visibility="gone"
|
||||
app:icon="@drawable/baseline_swap_calls_24"
|
||||
app:icon="@drawable/eh_ic_find_replace_white_24dp"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/btn_webview"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
|
@ -47,15 +47,15 @@
|
||||
android:title="@string/action_edit_cover"
|
||||
app:showAsAction="never" />-->
|
||||
|
||||
<!--<item
|
||||
<item
|
||||
android:id="@+id/action_migrate"
|
||||
android:title="@string/action_migrate"
|
||||
app:showAsAction="never" />-->
|
||||
app:showAsAction="never" />
|
||||
|
||||
<item
|
||||
<!--<item
|
||||
android:id="@+id/action_merge"
|
||||
android:title="@string/merge_with_another"
|
||||
app:showAsAction="never" />
|
||||
app:showAsAction="never" />-->
|
||||
|
||||
<item
|
||||
android:id="@+id/action_edit"
|
||||
|
@ -253,6 +253,7 @@
|
||||
<!-- Manga Page -->
|
||||
<!-- Manga Info -->
|
||||
<string name="az_recommends">See Recommendations</string>
|
||||
<string name="merge">Merge</string>
|
||||
<string name="merge_with_another_source">Merge With Another</string>
|
||||
|
||||
<!-- Manga info fragment -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user