mirror of
https://github.com/mihonapp/mihon.git
synced 2025-11-05 08:38:56 +01:00
Clean up strings and resources (#8253)
* Clean up strings and resources * fix pringle's typo * restore catching file pick errors * add back file chooser title * revert #7740 and remove try-catch of chooser-wrapped intent * swap xmlns lines * swap xml tools lines
This commit is contained in:
@@ -70,7 +70,6 @@ import kotlin.math.roundToInt
|
||||
|
||||
/**
|
||||
* Controller that shows the currently active downloads.
|
||||
* Uses R.layout.fragment_download_queue.
|
||||
*/
|
||||
class DownloadController :
|
||||
FullComposeController<DownloadPresenter>(),
|
||||
|
||||
@@ -56,7 +56,7 @@ class LibraryController(
|
||||
onClickFilter = ::showSettingsSheet,
|
||||
onClickRefresh = {
|
||||
val started = LibraryUpdateService.start(context, it)
|
||||
context.toast(if (started) R.string.updating_library else R.string.update_already_running)
|
||||
context.toast(if (started) R.string.updating_category else R.string.update_already_running)
|
||||
started
|
||||
},
|
||||
onClickInvertSelection = { presenter.invertSelection(presenter.activeCategory) },
|
||||
|
||||
@@ -6,8 +6,6 @@ import android.content.Intent
|
||||
import android.graphics.drawable.BitmapDrawable
|
||||
import android.net.Uri
|
||||
import android.os.Bundle
|
||||
import androidx.activity.result.PickVisualMediaRequest
|
||||
import androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.collectAsState
|
||||
import androidx.compose.runtime.remember
|
||||
@@ -88,7 +86,7 @@ class MangaFullCoverDialog : FullComposeController<MangaFullCoverDialog.MangaFul
|
||||
} catch (e: Throwable) {
|
||||
withUIContext {
|
||||
logcat(LogPriority.ERROR, e)
|
||||
activity.toast(R.string.error_saving_cover)
|
||||
activity.toast(R.string.error_sharing_cover)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -114,8 +112,11 @@ class MangaFullCoverDialog : FullComposeController<MangaFullCoverDialog.MangaFul
|
||||
private fun changeCover(action: EditCoverAction) {
|
||||
when (action) {
|
||||
EditCoverAction.EDIT -> {
|
||||
// This will open new Photo Picker eventually.
|
||||
// See https://github.com/tachiyomiorg/tachiyomi/pull/8253#issuecomment-1285747310
|
||||
val intent = Intent(Intent.ACTION_GET_CONTENT).apply { type = "image/*" }
|
||||
startActivityForResult(
|
||||
PickVisualMedia().createIntent(activity!!, PickVisualMediaRequest(PickVisualMedia.ImageOnly)),
|
||||
Intent.createChooser(intent, resources?.getString(R.string.file_select_cover)),
|
||||
REQUEST_IMAGE_OPEN,
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user