fix: snackbar not showing in landscape mode (#476)
* Fix snackbar not showing in landscape This affected also all tablets since they use the landscape view! Added `setTextMaxLines` because for some reason the text is truncated on tablets. Fixes #473. Co-Authored-By: Jcuhfehl <91626737+Jcuhfehl@users.noreply.github.com> * Remove unused import --------- Co-authored-by: Jcuhfehl <91626737+Jcuhfehl@users.noreply.github.com>
This commit is contained in:
parent
048ec27b1c
commit
58be66f541
1 changed files with 1 additions and 2 deletions
|
@ -14,7 +14,6 @@ import androidx.navigation.fragment.findNavController
|
|||
import com.google.android.material.snackbar.Snackbar
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import dev.jdtech.jellyfin.AppPreferences
|
||||
import dev.jdtech.jellyfin.R
|
||||
import dev.jdtech.jellyfin.adapters.FavoritesListAdapter
|
||||
import dev.jdtech.jellyfin.adapters.HomeEpisodeListAdapter
|
||||
import dev.jdtech.jellyfin.adapters.ViewItemListAdapter
|
||||
|
@ -58,7 +57,7 @@ class DownloadsFragment : Fragment() {
|
|||
launch {
|
||||
viewModel.connectionError.collect {
|
||||
Snackbar.make(binding.root, CoreR.string.no_server_connection, Snackbar.LENGTH_INDEFINITE)
|
||||
.setAnchorView(requireActivity().findViewById(R.id.nav_view))
|
||||
.setTextMaxLines(2)
|
||||
.setAction(CoreR.string.offline_mode) {
|
||||
appPreferences.offlineMode = true
|
||||
activity?.restart()
|
||||
|
|
Loading…
Reference in a new issue