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

Commit 8c3609d8 authored by Hasib Prince's avatar Hasib Prince
Browse files

fixed: app was not showing proper language

parent 2de3751f
Loading
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ import foundation.e.apps.utils.modules.DataStoreModule
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.async
import kotlinx.coroutines.withContext
import java.util.Locale
import javax.inject.Inject

class GPlayAPIImpl @Inject constructor(
@@ -46,7 +47,10 @@ class GPlayAPIImpl @Inject constructor(
    // TODO: DON'T HARDCODE DISPATCHERS IN ANY METHODS
    suspend fun fetchAuthData() = withContext(Dispatchers.IO) {
        val data = async { tokenRepository.getAuthData() }
        data.await()?.let { dataStoreModule.saveCredentials(it) }
        data.await()?.let {
            it.locale = Locale.getDefault() // update locale with the default locale from settings
            dataStoreModule.saveCredentials(it)
        }
    }

    fun fetchAuthData(email: String, aasToken: String): AuthData {