mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-01 22:58:57 +01:00
Implemented J2K Auto Source Migration
(cherry picked from commit 8ba75831e6f51f6472d85f813405ede3f679cfd8)
This commit is contained in:
10
app/src/main/res/drawable/baseline_swap_calls_24.xml
Normal file
10
app/src/main/res/drawable/baseline_swap_calls_24.xml
Normal file
@@ -0,0 +1,10 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0"
|
||||
android:tint="?attr/colorControlNormal">
|
||||
<path
|
||||
android:fillColor="@android:color/white"
|
||||
android:pathData="M18,4l-4,4h3v7c0,1.1 -0.9,2 -2,2s-2,-0.9 -2,-2V8c0,-2.21 -1.79,-4 -4,-4S5,5.79 5,8v7H2l4,4 4,-4H7V8c0,-1.1 0.9,-2 2,-2s2,0.9 2,2v7c0,2.21 1.79,4 4,4s4,-1.79 4,-4V8h3l-4,-4z"/>
|
||||
</vector>
|
||||
@@ -16,7 +16,7 @@
|
||||
app:layout_constraintHorizontal_bias="0.0"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent"
|
||||
tools:listitem="@layout/eh_source_item">
|
||||
tools:listitem="@layout/migration_source_item">
|
||||
|
||||
</androidx.recyclerview.widget.RecyclerView>
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="Data to include in migration"
|
||||
android:text="@string/data_to_include_in_migration"
|
||||
android:textAppearance="@style/TextAppearance.Medium.Body2"
|
||||
app:layout_constraintBottom_toTopOf="@+id/mig_chapters"
|
||||
app:layout_constraintStart_toStartOf="@+id/textView" />
|
||||
@@ -45,7 +45,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:checked="true"
|
||||
android:text="@string/categories"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/mig_chapters"
|
||||
@@ -56,7 +55,6 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:checked="true"
|
||||
android:text="@string/track"
|
||||
app:layout_constraintBottom_toBottomOf="@+id/mig_categories"
|
||||
@@ -67,9 +65,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="8dp"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="Options"
|
||||
android:text="@string/options"
|
||||
android:textAppearance="@style/TextAppearance.Medium.Body2"
|
||||
app:layout_constraintBottom_toTopOf="@+id/prioritize_chapter_count"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
@@ -95,7 +92,8 @@
|
||||
android:clickable="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/fuzzy_search"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/prioritize_chapter_count" />
|
||||
app:layout_constraintStart_toEndOf="@+id/prioritize_chapter_count"
|
||||
android:focusable="true" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/use_smart_search"
|
||||
@@ -114,11 +112,12 @@
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="Use intelligent search algorithm"
|
||||
android:text="@string/use_intelligent_search"
|
||||
android:clickable="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/copy_manga"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/prioritize_chapter_count" />
|
||||
app:layout_constraintStart_toEndOf="@+id/prioritize_chapter_count"
|
||||
android:focusable="true" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/copy_manga"
|
||||
@@ -137,11 +136,12 @@
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="Keep old manga"
|
||||
android:text="@string/keep_old_manga"
|
||||
android:clickable="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/extra_search_param"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/prioritize_chapter_count" />
|
||||
app:layout_constraintStart_toEndOf="@+id/prioritize_chapter_count"
|
||||
android:focusable="true" />
|
||||
|
||||
<androidx.appcompat.widget.SwitchCompat
|
||||
android:id="@+id/extra_search_param"
|
||||
@@ -160,11 +160,12 @@
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:gravity="start|center_vertical"
|
||||
android:text="Include extra search parameter when searching"
|
||||
android:text="@string/include_extra_search_parameter"
|
||||
android:clickable="true"
|
||||
app:layout_constraintBottom_toTopOf="@+id/extra_search_param_text"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toEndOf="@+id/prioritize_chapter_count" />
|
||||
app:layout_constraintStart_toEndOf="@+id/prioritize_chapter_count"
|
||||
android:focusable="true" />
|
||||
|
||||
<EditText
|
||||
android:id="@+id/extra_search_param_text"
|
||||
@@ -175,11 +176,12 @@
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:ems="10"
|
||||
android:hint="Search parameter (e.g. language:english)"
|
||||
android:hint="@string/search_parameter"
|
||||
android:inputType="textPersonName"
|
||||
app:layout_constraintBottom_toTopOf="@+id/begin_migration_btn"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
android:importantForAutofill="no" />
|
||||
|
||||
<Button
|
||||
android:id="@+id/begin_migration_btn"
|
||||
@@ -191,7 +193,7 @@
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="Begin migration"
|
||||
android:text="@string/begin_migration"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent" />
|
||||
@@ -17,7 +17,7 @@
|
||||
android:id="@+id/manga_cover"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
android:layout_marginLeft="16dp"
|
||||
android:layout_marginStart="16dp"
|
||||
android:layout_marginTop="16dp"
|
||||
android:contentDescription="@string/description_cover"
|
||||
app:layout_constraintDimensionRatio="l,2:3"
|
||||
@@ -71,7 +71,7 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:clickable="false"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
@@ -96,7 +96,7 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:clickable="false"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
@@ -121,7 +121,7 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:clickable="false"
|
||||
android:ellipsize="end"
|
||||
android:maxLines="1"
|
||||
@@ -146,7 +146,7 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:clickable="false"
|
||||
android:textIsSelectable="false"
|
||||
app:layout_constraintLeft_toRightOf="@+id/manga_chapters_label"
|
||||
@@ -169,7 +169,7 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:clickable="false"
|
||||
android:textIsSelectable="false"
|
||||
app:layout_constraintLeft_toRightOf="@+id/manga_last_chapter_label"
|
||||
@@ -192,7 +192,7 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:clickable="false"
|
||||
android:textIsSelectable="false"
|
||||
app:layout_constraintLeft_toRightOf="@+id/manga_last_update_label"
|
||||
@@ -215,7 +215,7 @@
|
||||
style="@style/TextAppearance.Regular.Body1.Secondary"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginLeft="8dp"
|
||||
android:layout_marginStart="8dp"
|
||||
android:clickable="false"
|
||||
android:textIsSelectable="false"
|
||||
app:layout_constraintLeft_toRightOf="@+id/manga_source_label"
|
||||
@@ -1,11 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.constraintlayout.widget.ConstraintLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:background="?attr/colorPrimary">
|
||||
android:background="?attr/colorPrimary" >
|
||||
|
||||
<exh.ui.migration.manga.process.DeactivatableViewPager
|
||||
<eu.kanade.tachiyomi.ui.migration.manga.process.DeactivatableViewPager
|
||||
android:id="@+id/pager"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
@@ -1,6 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:animateLayoutChanges="true">
|
||||
@@ -10,8 +11,8 @@
|
||||
android:layout_height="match_parent">
|
||||
|
||||
<include
|
||||
android:id="@+id/eh_manga_card_from"
|
||||
layout="@layout/eh_manga_card"
|
||||
android:id="@+id/migration_manga_card_from"
|
||||
layout="@layout/migration_manga_card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
@@ -33,12 +34,12 @@
|
||||
android:scaleType="center"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toBottomOf="@+id/eh_manga_card_from"
|
||||
app:srcCompat="@drawable/eh_ic_arrow_drop_down_white_100dp" />
|
||||
app:layout_constraintTop_toBottomOf="@+id/migration_manga_card_from"
|
||||
app:srcCompat="@drawable/ic_arrow_down_white_32dp" />
|
||||
|
||||
<include
|
||||
android:id="@+id/eh_manga_card_to"
|
||||
layout="@layout/eh_manga_card"
|
||||
android:id="@+id/migration_manga_card_to"
|
||||
layout="@layout/migration_manga_card"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginStart="16dp"
|
||||
@@ -55,10 +56,8 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_marginEnd="8dp"
|
||||
android:layout_marginRight="8dp"
|
||||
android:layout_marginBottom="8dp"
|
||||
android:drawableStart="@drawable/eh_ic_clear_white_24dp"
|
||||
android:drawableLeft="@drawable/eh_ic_clear_white_24dp"
|
||||
android:drawableStart="@drawable/ic_clear_grey"
|
||||
android:drawablePadding="6dp"
|
||||
android:text="Skip manga"
|
||||
android:textColor="#ffffff"
|
||||
@@ -73,8 +72,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:alpha="0.5"
|
||||
android:drawableStart="@drawable/eh_ic_check_white_24dp"
|
||||
android:drawableLeft="@drawable/eh_ic_check_white_24dp"
|
||||
android:drawableStart="@drawable/ic_check_box_24dp"
|
||||
android:drawablePadding="6dp"
|
||||
android:enabled="false"
|
||||
android:text="Migrate manga"
|
||||
8
app/src/main/res/layout/eh_smart_search.xml → app/src/main/res/layout/smart_search.xml
Executable file → Normal file
8
app/src/main/res/layout/eh_smart_search.xml → app/src/main/res/layout/smart_search.xml
Executable file → Normal file
@@ -1,6 +1,8 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
<androidx.coordinatorlayout.widget.CoordinatorLayout
|
||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:fitsSystemWindows="true">
|
||||
@@ -40,7 +42,7 @@
|
||||
android:layout_marginBottom="8dp"
|
||||
android:text="Searching source..."
|
||||
android:textAppearance="@style/TextAppearance.Medium.Title"
|
||||
android:textColor="@color/white" />
|
||||
android:textColor="@android:color/white" />
|
||||
|
||||
<ProgressBar
|
||||
android:id="@+id/intercept_progress"
|
||||
@@ -48,7 +50,7 @@
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
android:layout_gravity="center"
|
||||
android:indeterminateTint="@color/white" />
|
||||
android:indeterminateTint="@android:color/white" />
|
||||
</LinearLayout>
|
||||
</LinearLayout>
|
||||
|
||||
@@ -31,8 +31,10 @@
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
<item
|
||||
android:id="@+id/action_auto_source_migration"
|
||||
android:title="Source migration (automatic)"
|
||||
app:showAsAction="never"/>
|
||||
android:id="@+id/action_migrate"
|
||||
android:icon="@drawable/baseline_swap_calls_24"
|
||||
android:title="@string/label_migration"
|
||||
app:iconTint="?attr/colorOnPrimary"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
</menu>
|
||||
|
||||
@@ -644,6 +644,12 @@
|
||||
<string name="channel_backup_restore">Backup and restore</string>
|
||||
<string name="channel_backup_restore_progress">Progress</string>
|
||||
<string name="channel_backup_restore_complete">Complete</string>
|
||||
<string name="data_to_include_in_migration">Data to include in migration</string>
|
||||
<string name="search_parameter">Search parameter (e.g. language:english)</string>
|
||||
<string name="include_extra_search_parameter">Include extra search parameter when searching</string>
|
||||
<string name="keep_old_manga">Keep old manga</string>
|
||||
<string name="use_intelligent_search">Use intelligent search algorithm</string>
|
||||
<string name="begin_migration">Begin migration</string>
|
||||
|
||||
<!-- EXH -->
|
||||
<string name="label_login">Login</string>
|
||||
|
||||
Reference in New Issue
Block a user