mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
DROID-2239 Membership | Feature | Introduce membership and payments (#1189)
This commit is contained in:
parent
a15a3f22f1
commit
6493728687
72 changed files with 7540 additions and 2118 deletions
|
@ -3,11 +3,17 @@ package com.anytypeio.anytype.device
|
|||
import android.content.Context
|
||||
import androidx.core.os.ConfigurationCompat
|
||||
import com.anytypeio.anytype.domain.misc.LocaleProvider
|
||||
import java.util.Locale
|
||||
|
||||
class DefaultLocalProvider(
|
||||
private val context: Context
|
||||
): LocaleProvider {
|
||||
override fun language(): String? {
|
||||
return ConfigurationCompat.getLocales(context.resources.configuration)[0]?.language
|
||||
) : LocaleProvider {
|
||||
|
||||
private val defaultLocale by lazy {
|
||||
ConfigurationCompat.getLocales(context.resources.configuration).get(0)
|
||||
?: Locale.getDefault()
|
||||
}
|
||||
|
||||
override fun language(): String = defaultLocale.language
|
||||
override fun locale(): Locale = defaultLocale
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue