mirror of
https://git.mihon.tech/mihonapp/mihon
synced 2024-11-24 14:15:54 +03:00
Added a getting started guide action for when the library is empty
Co-authored-by: Jays2Kings <Jays2Kings@users.noreply.github.com>
This commit is contained in:
parent
18b5250ed1
commit
b9f7660a91
2 changed files with 12 additions and 2 deletions
|
@ -33,7 +33,9 @@ import eu.kanade.tachiyomi.ui.browse.source.globalsearch.GlobalSearchController
|
|||
import eu.kanade.tachiyomi.ui.main.MainActivity
|
||||
import eu.kanade.tachiyomi.ui.manga.MangaController
|
||||
import eu.kanade.tachiyomi.util.system.getResourceColor
|
||||
import eu.kanade.tachiyomi.util.system.openInBrowser
|
||||
import eu.kanade.tachiyomi.util.system.toast
|
||||
import eu.kanade.tachiyomi.widget.EmptyView
|
||||
import kotlinx.coroutines.flow.drop
|
||||
import kotlinx.coroutines.flow.launchIn
|
||||
import kotlinx.coroutines.flow.onEach
|
||||
|
@ -275,7 +277,14 @@ class LibraryController(
|
|||
if (mangaMap.isNotEmpty()) {
|
||||
binding.emptyView.hide()
|
||||
} else {
|
||||
binding.emptyView.show(R.string.information_empty_library)
|
||||
binding.emptyView.show(
|
||||
R.string.information_empty_library,
|
||||
listOf(
|
||||
EmptyView.Action(R.string.getting_started_guide, R.drawable.ic_help_24dp) {
|
||||
activity?.openInBrowser("https://tachiyomi.org/help/guides/getting-started")
|
||||
}
|
||||
),
|
||||
)
|
||||
(activity as? MainActivity)?.ready = true
|
||||
}
|
||||
|
||||
|
|
|
@ -749,7 +749,8 @@
|
|||
<string name="information_no_downloads">No downloads</string>
|
||||
<string name="information_no_recent">No recent updates</string>
|
||||
<string name="information_no_recent_manga">Nothing read recently</string>
|
||||
<string name="information_empty_library">Your library is empty. Add series to your library from Browse.</string>
|
||||
<string name="information_empty_library">Your library is empty</string>
|
||||
<string name="getting_started_guide">Getting started guide</string>
|
||||
<string name="information_empty_category">You have no categories. Tap the plus button to create one for organizing your library.</string>
|
||||
<string name="information_empty_category_dialog">You don\'t have any categories yet.</string>
|
||||
<string name="information_cloudflare_bypass_failure">Failed to bypass Cloudflare</string>
|
||||
|
|
Loading…
Reference in a new issue