From bac01c98073dbee6c09144b6ebc55b6a0d56d0da Mon Sep 17 00:00:00 2001 From: Jay Date: Mon, 6 Jan 2020 18:01:42 -0800 Subject: [PATCH] Spelling fixes + fix to drag & drop Targeting tracepot for crashes Migrations now shows how many manual migrations were made after skipping the rest --- app/src/main/java/eu/kanade/tachiyomi/App.kt | 2 +- .../data/updater/github/GithubService.kt | 2 +- .../tachiyomi/extension/ExtensionUpdateJob.kt | 5 ++--- .../tachiyomi/ui/library/LibraryController.kt | 4 ++-- .../manga/process/MigrationListController.kt | 22 ++++++++++++++++--- .../ui/setting/SettingsAboutController.kt | 2 +- app/src/main/res/values/strings.xml | 9 ++++---- 7 files changed, 31 insertions(+), 15 deletions(-) diff --git a/app/src/main/java/eu/kanade/tachiyomi/App.kt b/app/src/main/java/eu/kanade/tachiyomi/App.kt index 435780ffff..81f4442202 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/App.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/App.kt @@ -27,7 +27,7 @@ import uy.kohesive.injekt.injectLazy import uy.kohesive.injekt.registry.default.DefaultRegistrar @ReportsCrashes( - formUri = "http://tachiyomi.kanade.eu/crash_report", + formUri = "https://collector.tracepot.com/e90773ff", reportType = org.acra.sender.HttpSender.Type.JSON, httpMethod = org.acra.sender.HttpSender.Method.PUT, buildConfigClass = BuildConfig::class, diff --git a/app/src/main/java/eu/kanade/tachiyomi/data/updater/github/GithubService.kt b/app/src/main/java/eu/kanade/tachiyomi/data/updater/github/GithubService.kt index b32a9ff8e6..1831157860 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/data/updater/github/GithubService.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/data/updater/github/GithubService.kt @@ -27,7 +27,7 @@ interface GithubService { } } - @GET("/repos/Jays2Kings/tachiyomi/releases/latest") + @GET("/repos/Jays2Kings/tachiyomiJ2K/releases/latest") fun getLatestVersion(): Observable } diff --git a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt index 2838d2584a..6ab0597f5b 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/extension/ExtensionUpdateJob.kt @@ -24,7 +24,6 @@ class ExtensionUpdateJob : Job() { val extensionManager: ExtensionManager = Injekt.get() extensionManager.findAvailableExtensions() - // Update favorite manga. Destroy service when completed or in case of an error. Observable.defer { extensionManager.getInstalledExtensionsObservable().map { list -> val pendingUpdates = list.filter { it.hasUpdate } @@ -71,8 +70,8 @@ class ExtensionUpdateJob : Job() { const val TAG = "ExtensionUpdate" fun setupTask() { - JobRequest.Builder(TAG).setPeriodic(TimeUnit.DAYS.toMillis(1), - TimeUnit.HOURS.toMillis(1)) + JobRequest.Builder(TAG).setPeriodic(TimeUnit.HOURS.toMillis(12), + TimeUnit.HOURS.toMillis(2)) .setRequiredNetworkType(JobRequest.NetworkType.CONNECTED) .setRequirementsEnforced(true) .setUpdateCurrent(true) diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt index f1ab4e7426..74f70f7dab 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/library/LibraryController.kt @@ -429,8 +429,8 @@ class LibraryController( } R.id.action_alpha_asc -> reOrder(1) R.id.action_alpha_dsc -> reOrder(2) - R.id.action_update_asc -> reOrder(3) - R.id.action_update_dsc -> reOrder(4) + R.id.action_update_dsc -> reOrder(3) + R.id.action_update_asc -> reOrder(4) else -> return super.onOptionsItemSelected(item) } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt index dac0202f5f..9b2b3deae8 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/migration/manga/process/MigrationListController.kt @@ -71,6 +71,7 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle), private var migrationsJob: Job? = null private var migratingManga: MutableList? = null private var selectedPosition:Int? = null + private var manaulMigrations = 0 override fun inflateView(inflater: LayoutInflater, container: ViewGroup): View { return inflater.inflate(R.layout.migration_list_controller, container, false) @@ -263,7 +264,16 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle), override fun noMigration() { launchUI { - activity?.toast(R.string.no_migrations) + val res = resources + if (res != null) { + activity?.toast( + res.getString( + R.string.x_migrations, + if (manaulMigrations == 0) res.getString(R.string.no) + else "$manaulMigrations" + ) + ) + } router.popCurrentController() } } @@ -281,8 +291,14 @@ class MigrationListController(bundle: Bundle? = null) : BaseController(bundle), } } R.id.action_skip -> adapter?.removeManga(position) - R.id.action_migrate_now -> adapter?.migrateManga(position, false) - R.id.action_copy_now -> adapter?.migrateManga(position, true) + R.id.action_migrate_now -> { + adapter?.migrateManga(position, false) + manaulMigrations++ + } + R.id.action_copy_now -> { + adapter?.migrateManga(position, true) + manaulMigrations++ + } } } diff --git a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt index f47d6762fc..105af56bd5 100644 --- a/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt +++ b/app/src/main/java/eu/kanade/tachiyomi/ui/setting/SettingsAboutController.kt @@ -60,7 +60,7 @@ class SettingsAboutController : SettingsController() { } preference { title = "Github" - val url = "https://github.com/Jays2Kings/tachiyomi" + val url = "https://github.com/Jays2Kings/tachiyomiJ2K" summary = url onClick { val intent = Intent(Intent.ACTION_VIEW, Uri.parse(url)) diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 53c3e9e02b..dd137d2a20 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -22,8 +22,8 @@ Selected: %1$d Backup Source migration - Re-order - Alphabetically (descending) + Reorder + Alpha. (descending) Hide title Show title Extensions @@ -48,7 +48,7 @@ First updated Drag & Drop Search - Skip manga + Don\'t migrate Global search Select all Mark as read @@ -430,7 +430,8 @@ Migrate %1$d%2$s manga? Copy %1$d%2$s manga? (skipping %1$d) - No manga migrated + %1$s manga migrated + No No chapters found, this manga cannot be used for migration No Alternatives Found