Move StaffMode declaration out of paths
This commit is contained in:
@@ -39,11 +39,7 @@ use terminal_view::{get_working_directory, TerminalView};
|
||||
use fs::RealFs;
|
||||
use settings::watched_json::{watch_keymap_file, watch_settings_file, WatchedJsonFile};
|
||||
use theme::ThemeRegistry;
|
||||
use util::{
|
||||
channel::RELEASE_CHANNEL,
|
||||
paths::{self, StaffMode},
|
||||
ResultExt, TryFutureExt,
|
||||
};
|
||||
use util::{channel::RELEASE_CHANNEL, paths, ResultExt, StaffMode, TryFutureExt};
|
||||
use workspace::{
|
||||
self, item::ItemHandle, notifications::NotifyResultExt, AppState, NewFile, OpenPaths, Workspace,
|
||||
};
|
||||
@@ -109,8 +105,6 @@ fn main() {
|
||||
app.run(move |cx| {
|
||||
cx.set_global(*RELEASE_CHANNEL);
|
||||
|
||||
#[cfg(not(debug_assertions))]
|
||||
cx.set_global(StaffMode(false));
|
||||
#[cfg(debug_assertions)]
|
||||
cx.set_global(StaffMode(true));
|
||||
|
||||
|
||||
@@ -32,11 +32,7 @@ use serde::Deserialize;
|
||||
use serde_json::to_string_pretty;
|
||||
use settings::{keymap_file_json_schema, settings_file_json_schema, Settings};
|
||||
use std::{borrow::Cow, env, path::Path, str, sync::Arc};
|
||||
use util::{
|
||||
channel::ReleaseChannel,
|
||||
paths::{self, StaffMode},
|
||||
ResultExt,
|
||||
};
|
||||
use util::{channel::ReleaseChannel, paths, ResultExt, StaffMode};
|
||||
use uuid::Uuid;
|
||||
pub use workspace;
|
||||
use workspace::{sidebar::SidebarSide, AppState, Workspace};
|
||||
@@ -303,7 +299,7 @@ pub fn initialize_workspace(
|
||||
|
||||
let theme_names = app_state
|
||||
.themes
|
||||
.list(**cx.try_global::<StaffMode>().unwrap_or(&StaffMode(false)))
|
||||
.list(**cx.default_global::<StaffMode>())
|
||||
.map(|meta| meta.name)
|
||||
.collect();
|
||||
let language_names = app_state.languages.language_names();
|
||||
|
||||
Reference in New Issue
Block a user