Skip to content
Snippets Groups Projects
Commit 70ae3966 authored by Nicolas Pomepuy's avatar Nicolas Pomepuy Committed by Geoffrey Métais
Browse files

Fix CalledFromWrongThreadException

(cherry picked from commit 25f8fb78)
parent d8769c78
No related branches found
No related tags found
No related merge requests found
......@@ -196,8 +196,10 @@ class FileBrowserTvFragment : BaseBrowserTvFragment(), PathAdapterListener {
else -> browserFavRepository.addNetworkFavItem(mw.uri, mw.title, mw.artworkURL)
}
favExists = !favExists
binding.favoriteButton.setImageResource(if (favExists) R.drawable.ic_menu_fav_tv else R.drawable.ic_menu_not_fav_tv)
binding.imageButtonFavorite.setImageResource(if (favExists) R.drawable.ic_menu_fav_tv_normal else R.drawable.ic_menu_not_fav_tv_normal)
withContext(Dispatchers.Main) {
binding.favoriteButton.setImageResource(if (favExists) R.drawable.ic_menu_fav_tv else R.drawable.ic_menu_not_fav_tv)
binding.imageButtonFavorite.setImageResource(if (favExists) R.drawable.ic_menu_fav_tv_normal else R.drawable.ic_menu_not_fav_tv_normal)
}
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment