first pass of merging in warp (doesn't build)
This commit is contained in:
@@ -1,14 +1,12 @@
|
||||
use std::collections::HashMap;
|
||||
|
||||
use std::ops::Deref;
|
||||
|
||||
use anyhow::{Result, anyhow};
|
||||
use galaxyui::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
use galaxy_features::FeatureFlag;
|
||||
use galaxyui_core::{AppContext, Entity, ModelContext, SingletonEntity};
|
||||
use galaxyui_extras::user_preferences::UserPreferences;
|
||||
|
||||
use super::PrivatePreferences;
|
||||
|
||||
use super::{RespectUserSyncSetting, SupportedPlatforms, SyncToCloud};
|
||||
use super::{PrivatePreferences, RespectUserSyncSetting, SupportedPlatforms, SyncToCloud};
|
||||
|
||||
type UpdateFn = Box<dyn FnMut(String, bool, &mut AppContext) -> Result<()>>;
|
||||
|
||||
@@ -94,7 +92,7 @@ pub enum SettingsEvent {
|
||||
}
|
||||
|
||||
impl SettingsManager {
|
||||
/// Registers a function that updates a a setting with the given storage key
|
||||
/// Registers a function that updates a setting with the given storage key
|
||||
/// to have a new value. Also tracks whether that storage key is for a cloud-synced
|
||||
/// setting and what platforms it's supported on.
|
||||
#[allow(clippy::too_many_arguments)]
|
||||
@@ -232,7 +230,7 @@ impl SettingsManager {
|
||||
<PrivatePreferences as SingletonEntity>::as_ref(ctx).deref();
|
||||
let prefs: &dyn UserPreferences = if self.is_private_for_storage_key(storage_key) {
|
||||
private
|
||||
} else if super::is_settings_file_enabled() {
|
||||
} else if FeatureFlag::SettingsFile.is_enabled() {
|
||||
<super::PublicPreferences as SingletonEntity>::as_ref(ctx).as_preferences()
|
||||
} else {
|
||||
// When the settings file is disabled, fall back to the private
|
||||
|
||||
Reference in New Issue
Block a user