Fix manga importing

master
Koitharu 1 year ago
parent 749bc4a837
commit dcb92ed1af
Signed by: Koitharu
GPG Key ID: 676DEE768C17A9D7

@ -279,6 +279,10 @@
<service
android:name="org.koitharu.kotatsu.local.ui.LocalIndexUpdateService"
android:label="@string/local_manga_processing" />
<service
android:name="org.koitharu.kotatsu.local.ui.ImportService"
android:foregroundServiceType="dataSync"
android:label="@string/importing_manga" />
<service
android:name="org.koitharu.kotatsu.widget.shelf.ShelfWidgetService"
android:label="@string/manga_shelf"

@ -152,7 +152,8 @@ class ImportService : CoroutineIntentService() {
private const val CHANNEL_ID = "importing"
private const val FOREGROUND_NOTIFICATION_ID = 37
fun start(context: Context, uris: Iterable<Uri>): Boolean = try {
fun start(context: Context, uris: Collection<Uri>): Boolean = try {
require(uris.isNotEmpty())
for (uri in uris) {
val intent = Intent(context, ImportService::class.java)
intent.putExtra(DATA_URI, uri.toString())

Loading…
Cancel
Save