Commit 697b238b authored by Aayush Gupta's avatar Aayush Gupta
Browse files

categories: Remove redundant null checks



We have migrated to require API making these checks useless
Signed-off-by: Aayush Gupta's avatarAayush Gupta <theimpulson@e.email>
parent a33bae0c
......@@ -53,9 +53,7 @@ class ApplicationsFragment() : Fragment() {
}
view.error_resolve.setTextColor(Color.parseColor("#ffffff"))
if (color != null) {
view.error_resolve.setBackgroundColor(color)
}
view.error_resolve.setBackgroundColor(color)
// Bind to the list of applications categories
categoriesViewModel.getApplicationsCategories().observe(viewLifecycleOwner, Observer {
......
......@@ -40,11 +40,8 @@ class CategoriesFragment : Fragment() {
viewPager.adapter = CategoriesViewPagerAdapter(requireActivity().supportFragmentManager, tabLayout.tabCount, color)
viewPager.addOnPageChangeListener(TabLayout.TabLayoutOnPageChangeListener(tabLayout))
if (color != null) {
tabLayout.setSelectedTabIndicatorColor(color);
tabLayout.setTabTextColors(Color.parseColor("#000000"), color);
};
tabLayout.setSelectedTabIndicatorColor(color);
tabLayout.setTabTextColors(Color.parseColor("#000000"), color);
tabLayout.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
override fun onTabSelected(tab: TabLayout.Tab) {
......
......@@ -51,9 +51,7 @@ class GamesFragment() : Fragment() {
categoriesViewModel.loadCategories(requireContext())
}
view.error_resolve.setTextColor(Color.parseColor("#ffffff"))
if (color != null) {
view.error_resolve.setBackgroundColor(color)
}
view.error_resolve.setBackgroundColor(color)
// Bind to the list of games categories
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment