mirror of
https://github.com/anyproto/anytype-kotlin.git
synced 2025-06-08 05:47:05 +09:00
Tech | Experimental flavour config provider (#1680)
This commit is contained in:
parent
898d17f960
commit
2580f179dc
2 changed files with 31 additions and 3 deletions
|
@ -3,7 +3,10 @@ package com.anytypeio.anytype.data.auth.config
|
|||
import com.anytypeio.anytype.core_models.FlavourConfig
|
||||
import com.anytypeio.anytype.domain.config.FlavourConfigProvider
|
||||
|
||||
class FlavourConfigMemoryCache : FlavourConfigProvider {
|
||||
/**
|
||||
* Flavour-config provider for real-world application.
|
||||
*/
|
||||
class DefaultFlavourConfigProvider : FlavourConfigProvider {
|
||||
|
||||
private var config: FlavourConfig = FlavourConfig(
|
||||
enableDataView = false,
|
||||
|
@ -20,4 +23,22 @@ class FlavourConfigMemoryCache : FlavourConfigProvider {
|
|||
enableChannelSwitch = enableChannelSwitch
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Flavour-config provider mostly for development purposes.
|
||||
*/
|
||||
class ExperimentalFlavourConfigProvider : FlavourConfigProvider {
|
||||
|
||||
private var config: FlavourConfig = FlavourConfig(
|
||||
enableDataView = true,
|
||||
enableDebug = true,
|
||||
enableChannelSwitch = true
|
||||
)
|
||||
|
||||
override fun get(): FlavourConfig = config
|
||||
|
||||
override fun set(enableDataView: Boolean, enableDebug: Boolean, enableChannelSwitch: Boolean) {
|
||||
// Ignoring real config.
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue