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