Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -53,9 +53,7 @@ class ApplicationsFragment() : Fragment() {
        }

        view.error_resolve.setTextColor(Color.parseColor("#ffffff"))
        if (color != null) {
        view.error_resolve.setBackgroundColor(color)
        }

        // Bind to the list of applications categories
        categoriesViewModel.getApplicationsCategories().observe(viewLifecycleOwner, Observer {
+2 −5
Original line number Diff line number Diff line
@@ -40,12 +40,9 @@ 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.addOnTabSelectedListener(object : TabLayout.OnTabSelectedListener {
            override fun onTabSelected(tab: TabLayout.Tab) {
                viewPager.currentItem = tab.position
+1 −3
Original line number Diff line number Diff line
@@ -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)
        }


        // Bind to the list of games categories