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

Commit 83cdad05 authored by Hasib Prince's avatar Hasib Prince
Browse files

fixed: flickering in search page

parent cf97b6ed
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -382,8 +382,8 @@ class ApplicationListRVAdapter(
        privacyInfoViewModel.getAppPrivacyInfoLiveData(searchApp).observe(lifecycleOwner!!) {
            showPrivacyScore()
            val calculatedScore = privacyInfoViewModel.getPrivacyScore(searchApp)
            if (it.isSuccess() && calculatedScore != -1) {
            searchApp.privacyScore = calculatedScore
            if (it.isSuccess() && calculatedScore != -1) {
                appPrivacyScore.text = view.context.getString(
                    R.string.privacy_rating_out_of,
                    searchApp.privacyScore.toString()
+8 −4
Original line number Diff line number Diff line
@@ -61,6 +61,7 @@ import foundation.e.apps.utils.exceptions.GPlayLoginException
import foundation.e.apps.utils.modules.PWAManagerModule
import foundation.e.apps.utils.parentFragment.TimeoutFragment
import kotlinx.coroutines.launch
import timber.log.Timber
import javax.inject.Inject

@AndroidEntryPoint
@@ -177,6 +178,7 @@ class SearchFragment :
                currentList
            )
        ) {
            binding.loadingProgressBar.isVisible = it.data!!.second
            return false
        }

@@ -299,13 +301,11 @@ class SearchFragment :
    override fun showLoadingUI() {
        binding.shimmerLayout.startShimmer()
        binding.shimmerLayout.visibility = View.VISIBLE
        binding.recyclerView.visibility = View.GONE
    }

    override fun stopLoadingUI() {
        binding.shimmerLayout.stopShimmer()
        binding.shimmerLayout.visibility = View.GONE
        binding.recyclerView.visibility = View.VISIBLE
    }

    private fun updateProgressOfInstallingApps(downloadProgress: DownloadProgress) {
@@ -372,12 +372,14 @@ class SearchFragment :
            view?.requestFocus()
            searchHintLayout?.visibility = View.GONE
            shimmerLayout?.visibility = View.VISIBLE
            recyclerView?.visibility = View.GONE
            noAppsFoundLayout?.visibility = View.GONE
            /*
             * Set the search text and call for network result.
             */
            searchText = text
            val applicationListRVAdapter = recyclerView?.adapter as ApplicationListRVAdapter
            applicationListRVAdapter.setData(mutableListOf())
//            applicationListRVAdapter.notifyDataSetChanged()
            repostAuthObjects()
        }
        return false
@@ -398,8 +400,10 @@ class SearchFragment :

    override fun onSuggestionClick(position: Int): Boolean {
        searchViewModel.searchSuggest.value?.let {
            if (it.isNotEmpty()) {
                searchView?.setQuery(it[position].suggestedQuery, true)
            }
        }
        return true
    }

+1 −2
Original line number Diff line number Diff line
@@ -52,8 +52,7 @@
        android:id="@+id/recyclerView"
        android:layout_width="match_parent"
        android:layout_height="0dp"
        android:layout_weight="1"
        android:visibility="gone" />
        android:layout_weight="1" />

    <include
        android:id="@+id/searchHintLayout"