Cleanup and bugfixes for migration
Fix migration list actions Remove uneeded icons Rename some actions in library
@ -3,21 +3,18 @@ package eu.kanade.tachiyomi.ui.browse.migration.sources
|
||||
import android.os.Bundle
|
||||
import eu.kanade.tachiyomi.data.database.DatabaseHelper
|
||||
import eu.kanade.tachiyomi.data.database.models.Manga
|
||||
import eu.kanade.tachiyomi.data.preference.PreferencesHelper
|
||||
import eu.kanade.tachiyomi.source.LocalSource
|
||||
import eu.kanade.tachiyomi.source.SourceManager
|
||||
import eu.kanade.tachiyomi.ui.base.presenter.BasePresenter
|
||||
import eu.kanade.tachiyomi.ui.browse.migration.manga.MangaItem
|
||||
import exh.MERGED_SOURCE_ID
|
||||
import java.util.Locale
|
||||
import rx.android.schedulers.AndroidSchedulers
|
||||
import uy.kohesive.injekt.Injekt
|
||||
import uy.kohesive.injekt.api.get
|
||||
import java.util.Locale
|
||||
|
||||
class MigrationSourcesPresenter(
|
||||
private val sourceManager: SourceManager = Injekt.get(),
|
||||
private val db: DatabaseHelper = Injekt.get(),
|
||||
private val preferences: PreferencesHelper = Injekt.get()
|
||||
private val db: DatabaseHelper = Injekt.get()
|
||||
) : BasePresenter<MigrationSourcesController>() {
|
||||
|
||||
override fun onCreate(savedState: Bundle?) {
|
||||
@ -43,8 +40,4 @@ class MigrationSourcesPresenter(
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
private fun libraryToMigrationItem(library: List<Manga>, sourceId: Long): List<MangaItem> {
|
||||
return library.filter { it.source == sourceId }.map(::MangaItem)
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +0,0 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#FFFFFF"
|
||||
android:alpha="0.8">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M9,16.2L4.8,12l-1.4,1.4L9,19 21,7l-1.4,-1.4L9,16.2z"/>
|
||||
</vector>
|
Before Width: | Height: | Size: 220 B |
Before Width: | Height: | Size: 197 B |
Before Width: | Height: | Size: 289 B |
Before Width: | Height: | Size: 146 B |
Before Width: | Height: | Size: 151 B |
Before Width: | Height: | Size: 213 B |
Before Width: | Height: | Size: 209 B |
Before Width: | Height: | Size: 219 B |
Before Width: | Height: | Size: 323 B |
Before Width: | Height: | Size: 303 B |
Before Width: | Height: | Size: 279 B |
Before Width: | Height: | Size: 416 B |
@ -1,10 +1,8 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#FFFFFF"
|
||||
android:alpha="0.8">
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M16,1L4,1c-1.1,0 -2,0.9 -2,2v14h2L4,3h12L16,1zM19,5L8,5c-1.1,0 -2,0.9 -2,2v14c0,1.1 0.9,2 2,2h11c1.1,0 2,-0.9 2,-2L21,7c0,-1.1 -0.9,-2 -2,-2zM19,21L8,21L8,7h11v14z"/>
|
@ -1,10 +1,8 @@
|
||||
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
android:width="24dp"
|
||||
android:height="24dp"
|
||||
android:viewportWidth="24"
|
||||
android:viewportHeight="24"
|
||||
android:tint="#FFFFFF"
|
||||
android:alpha="0.8">
|
||||
android:viewportWidth="24.0"
|
||||
android:viewportHeight="24.0">
|
||||
<path
|
||||
android:fillColor="#FF000000"
|
||||
android:pathData="M18,7l-1.41,-1.41 -6.34,6.34 1.41,1.41L18,7zM22.24,5.59L11.66,16.17 7.48,12l-1.41,1.41L11.66,19l12,-12 -1.42,-1.41zM0.41,13.41L6,19l1.41,-1.41L1.83,12 0.41,13.41z"/>
|
@ -34,7 +34,7 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/action_source_migration"
|
||||
android:title="@string/label_migration"
|
||||
android:title="@string/source_migration"
|
||||
app:showAsAction="never"/>
|
||||
|
||||
<item
|
||||
|
@ -33,7 +33,7 @@
|
||||
<item
|
||||
android:id="@+id/action_migrate"
|
||||
android:icon="@drawable/baseline_swap_calls_24"
|
||||
android:title="@string/label_migration"
|
||||
android:title="@string/migrate"
|
||||
app:iconTint="?attr/colorOnPrimary"
|
||||
app:showAsAction="ifRoom" />
|
||||
|
||||
|
@ -4,12 +4,14 @@
|
||||
|
||||
<item
|
||||
android:id="@+id/action_copy_manga"
|
||||
android:icon="@drawable/ic_copy"
|
||||
android:icon="@drawable/ic_copy_24dp"
|
||||
android:title="@string/copy"
|
||||
app:iconTint="?attr/colorOnPrimary"
|
||||
app:showAsAction="ifRoom" />
|
||||
<item
|
||||
android:id="@+id/action_migrate_manga"
|
||||
android:icon="@drawable/ic_done_all"
|
||||
android:icon="@drawable/ic_done_all_24dp"
|
||||
android:title="@string/migrate"
|
||||
app:iconTint="?attr/colorOnPrimary"
|
||||
app:showAsAction="ifRoom" />
|
||||
</menu>
|