Fix snackbars not being in viewport properly
(cherry picked from commit 060f0682f49bd20b95d77bf091d34e4073308d58) # Conflicts: # app/src/main/java/eu/kanade/tachiyomi/ui/browse/source/browse/BrowseSourceController.kt # app/src/main/java/eu/kanade/tachiyomi/ui/main/MainActivity.kt
This commit is contained in:
parent
a284f5cd08
commit
025d794962
@ -56,6 +56,7 @@ import eu.kanade.tachiyomi.widget.EmptyView
|
|||||||
import exh.EXHSavedSearch
|
import exh.EXHSavedSearch
|
||||||
import exh.isEhBasedSource
|
import exh.isEhBasedSource
|
||||||
import kotlinx.android.parcel.Parcelize
|
import kotlinx.android.parcel.Parcelize
|
||||||
|
import kotlinx.android.synthetic.main.main_activity.root_coordinator
|
||||||
import kotlinx.coroutines.Job
|
import kotlinx.coroutines.Job
|
||||||
import kotlinx.coroutines.flow.drop
|
import kotlinx.coroutines.flow.drop
|
||||||
import kotlinx.coroutines.flow.filter
|
import kotlinx.coroutines.flow.filter
|
||||||
@ -578,7 +579,7 @@ open class BrowseSourceController(bundle: Bundle) :
|
|||||||
|
|
||||||
binding.emptyView.show(message, actions)
|
binding.emptyView.show(message, actions)
|
||||||
} else {
|
} else {
|
||||||
snack = binding.catalogueView.snack(message, Snackbar.LENGTH_INDEFINITE) {
|
snack = activity!!.root_coordinator?.snack(message, Snackbar.LENGTH_INDEFINITE) {
|
||||||
setAction(R.string.action_retry, retryAction)
|
setAction(R.string.action_retry, retryAction)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -183,8 +183,6 @@ class MainActivity : BaseActivity<MainActivityBinding>() {
|
|||||||
// WhatsNewDialogController().showDialog(router)
|
// WhatsNewDialogController().showDialog(router)
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// WhatsNewDialogController().showDialog(router)
|
|
||||||
|
|
||||||
// EXH -->
|
// EXH -->
|
||||||
// Perform EXH specific migrations
|
// Perform EXH specific migrations
|
||||||
if (EXHMigrations.upgrade(preferences)) {
|
if (EXHMigrations.upgrade(preferences)) {
|
||||||
|
@ -1060,7 +1060,7 @@ class MangaController :
|
|||||||
val manga = presenter.manga
|
val manga = presenter.manga
|
||||||
presenter.downloadChapters(chapters)
|
presenter.downloadChapters(chapters)
|
||||||
if (view != null && !manga.favorite) {
|
if (view != null && !manga.favorite) {
|
||||||
binding.recycler.snack(view.context.getString(R.string.snack_add_to_library), Snackbar.LENGTH_INDEFINITE) {
|
activity!!.root_coordinator?.snack(view.context.getString(R.string.snack_add_to_library), Snackbar.LENGTH_INDEFINITE) {
|
||||||
setAction(R.string.action_add) {
|
setAction(R.string.action_add) {
|
||||||
addToLibrary(manga)
|
addToLibrary(manga)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user