don't crash if initial loading was not successful
This commit is contained in:
parent
7a5f90cb82
commit
9705a752fb
|
@ -121,7 +121,7 @@ class MainActivity : AppCompatActivity(), BottomNavigationView.OnNavigationItemS
|
|||
val time = measureTimeMillis {
|
||||
Preferences.load(this)
|
||||
|
||||
// make sure credentials are set
|
||||
// make sure credentials are set, run's async
|
||||
EncryptedPreferences.readCredentials(this)
|
||||
if (EncryptedPreferences.password.isEmpty()) {
|
||||
showLoginDialog(true)
|
||||
|
|
|
@ -51,6 +51,7 @@ class HomeFragment : Fragment() {
|
|||
}
|
||||
|
||||
private fun initHighlight() {
|
||||
if (AoDParser.highlightsList.isNotEmpty()) {
|
||||
highlightMedia = AoDParser.highlightsList[0]
|
||||
|
||||
binding.textHighlightTitle.text = highlightMedia.title
|
||||
|
@ -63,6 +64,7 @@ class HomeFragment : Fragment() {
|
|||
loadIntoCompoundDrawable(R.drawable.ic_baseline_add_24, binding.textHighlightMyList)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private fun initRecyclerViews() {
|
||||
binding.recyclerMyList.addItemDecoration(MediaItemDecoration(9))
|
||||
|
|
Loading…
Reference in New Issue