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

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

Rename getAuthObjects() to fetchAuthObjects()

parent 92cb5f0a
Loading
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -45,13 +45,13 @@ class AuthenticatorRepository @Inject constructor(
        appLoungeDataStore.saveAuthData(auth)
    }

    suspend fun getAuthObjects(clearAuthTypes: List<String> = listOf()): List<AuthObject> {
    suspend fun fetchAuthObjects(authTypes: List<String> = listOf()): List<AuthObject> {

        val authObjectsLocal = ArrayList<AuthObject>()

        for (authenticator in authenticators) {
            if (!authenticator.isStoreActive()) continue
            if (authenticator::class.java.simpleName in clearAuthTypes) {
            if (authenticator::class.java.simpleName in authTypes) {
                authenticator.logout()
            }

+1 −1
Original line number Diff line number Diff line
@@ -174,7 +174,7 @@ class PlayStoreRepository @Inject constructor(

    private suspend fun refreshPlayStoreAuthentication() {
        Timber.i("Refreshing authentication.")
        authenticatorRepository.getAuthObjects(listOf(PlayStoreAuthenticator::class.java.simpleName))
        authenticatorRepository.fetchAuthObjects(listOf(PlayStoreAuthenticator::class.java.simpleName))
    }

    private fun isEmulator(): Boolean {
+1 −1
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ class LoginViewModel @Inject constructor(
     */
    fun startLoginFlow(clearList: List<String> = listOf()) {
        viewModelScope.launch {
            val authObjectsLocal = authenticatorRepository.getAuthObjects(clearList)
            val authObjectsLocal = authenticatorRepository.fetchAuthObjects(clearList)
            authObjects.postValue(authObjectsLocal)
        }
    }