mirror of
https://github.com/Suwayomi/TachideskJUI.git
synced 2025-12-10 06:42:05 +01:00
Localize library empty string
This commit is contained in:
@@ -77,6 +77,7 @@
|
|||||||
|
|
||||||
<!-- Library Menu -->
|
<!-- Library Menu -->
|
||||||
<string name="default_category">Default</string>
|
<string name="default_category">Default</string>
|
||||||
|
<string name="library_empty">Library is empty</string>
|
||||||
|
|
||||||
<!-- Manga Menu -->
|
<!-- Manga Menu -->
|
||||||
<string name="page_progress">Page %1$d</string>
|
<string name="page_progress">Page %1$d</string>
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ import ca.gosyer.data.models.Manga
|
|||||||
import ca.gosyer.data.server.interactions.CategoryInteractionHandler
|
import ca.gosyer.data.server.interactions.CategoryInteractionHandler
|
||||||
import ca.gosyer.data.server.interactions.LibraryInteractionHandler
|
import ca.gosyer.data.server.interactions.LibraryInteractionHandler
|
||||||
import ca.gosyer.data.server.interactions.UpdatesInteractionHandler
|
import ca.gosyer.data.server.interactions.UpdatesInteractionHandler
|
||||||
|
import ca.gosyer.i18n.MR
|
||||||
import ca.gosyer.uicore.vm.ContextWrapper
|
import ca.gosyer.uicore.vm.ContextWrapper
|
||||||
import ca.gosyer.uicore.vm.ViewModel
|
import ca.gosyer.uicore.vm.ViewModel
|
||||||
import kotlinx.coroutines.async
|
import kotlinx.coroutines.async
|
||||||
@@ -94,7 +95,7 @@ class LibraryScreenViewModel @Inject constructor(
|
|||||||
categoryHandler.getCategories()
|
categoryHandler.getCategories()
|
||||||
.onEach { categories ->
|
.onEach { categories ->
|
||||||
if (categories.isEmpty()) {
|
if (categories.isEmpty()) {
|
||||||
throw Exception("Library is empty")
|
throw Exception(MR.strings.library_empty.toPlatformString())
|
||||||
}
|
}
|
||||||
library.categories.value = categories.sortedBy { it.order }
|
library.categories.value = categories.sortedBy { it.order }
|
||||||
updateCategories(categories)
|
updateCategories(categories)
|
||||||
|
|||||||
Reference in New Issue
Block a user