Событие печати, смена адреса, иконки
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package core.network
|
||||
|
||||
import android.content.Context
|
||||
import android.content.SharedPreferences
|
||||
import com.google.gson.Gson
|
||||
import core.domain.model.FeaturesConfig
|
||||
import core.domain.model.ServerConfigModel
|
||||
@@ -13,12 +12,12 @@ class ServerConfig @Inject constructor(
|
||||
private val context: Context,
|
||||
private val gson: Gson
|
||||
) {
|
||||
private val prefs: SharedPreferences = context.getSharedPreferences("server_settings", Context.MODE_PRIVATE)
|
||||
private val prefs = context.getSharedPreferences("server_config_prefs", Context.MODE_PRIVATE)
|
||||
|
||||
companion object {
|
||||
const val DEFAULT_BASE_URL = "https://your-api.com/api/"
|
||||
private const val KEY_BASE_URL = "base_url"
|
||||
private const val KEY_CONFIG_DATA = "config_data"
|
||||
private const val KEY_CONFIG_DATA = "server_config_data"
|
||||
private const val DEFAULT_BASE_URL = "" // Пустой по умолчанию
|
||||
}
|
||||
|
||||
fun getBaseUrl(): String {
|
||||
@@ -48,3 +47,4 @@ class ServerConfig @Inject constructor(
|
||||
return feature(getServerConfig().features)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user