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

Commit c012a3d0 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Merge branch '0000-s-remove-deadcode-again' into 'main'

Remove some dead code

See merge request !388
parents cb1af144 ce983819
Loading
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -43,10 +43,6 @@ class FusedAPIRepository @Inject constructor(private val fusedAPIImpl: FusedApi)
        return fusedAPIImpl.getHomeScreenData(authData)
    }

    fun isHomesEmpty(fusedHomes: List<FusedHome>): Boolean {
        return fusedAPIImpl.isHomesEmpty(fusedHomes)
    }

    fun getApplicationCategoryPreference(): List<String> {
        return fusedAPIImpl.getApplicationCategoryPreference()
    }
+0 −6
Original line number Diff line number Diff line
@@ -27,12 +27,6 @@ interface FusedApi {
        const val APP_TYPE_PWA = "pwa"
    }

    /**
     * Check if list in all the FusedHome is empty.
     * If any list is not empty, send false.
     * Else (if all lists are empty) send true.
     */
    fun isHomesEmpty(fusedHomes: List<FusedHome>): Boolean
    fun getApplicationCategoryPreference(): List<String>

    suspend fun getHomeScreenData(
+0 −12
Original line number Diff line number Diff line
@@ -100,18 +100,6 @@ class FusedApiImpl @Inject constructor(
        private const val KEYWORD_TEST_SEARCH = "facebook"
    }

    /**
     * Check if list in all the FusedHome is empty.
     * If any list is not empty, send false.
     * Else (if all lists are empty) send true.
     */
    override fun isHomesEmpty(fusedHomes: List<FusedHome>): Boolean {
        fusedHomes.forEach {
            if (it.list.isNotEmpty()) return false
        }
        return true
    }

    override fun getApplicationCategoryPreference(): List<String> {
        val prefs = mutableListOf<String>()
        if (preferenceManagerModule.isGplaySelected()) prefs.add(APP_TYPE_ANY)