Skip to content

Commit 86e284c

Browse files
committed
remove servers in app feature flag
1 parent 375c63f commit 86e284c

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

apps/app-frontend/src/App.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1023,7 +1023,6 @@ provideAppUpdateDownloadProgress(appUpdateDownload)
10231023
<LibraryIcon />
10241024
</NavButton>
10251025
<NavButton
1026-
v-if="themeStore.featureFlags.servers_in_app"
10271026
v-tooltip.right="'Servers'"
10281027
to="/hosting/manage"
10291028
:is-primary="(r) => r.path === '/hosting/manage' || r.path === '/hosting/manage/'"

apps/app-frontend/src/store/theme.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ export const DEFAULT_FEATURE_FLAGS = {
55
page_path: false,
66
worlds_tab: false,
77
worlds_in_home: true,
8-
servers_in_app: false,
98
server_project_qa: false,
109
i18n_debug: false,
1110
}

packages/app-lib/src/state/settings.rs

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ pub enum FeatureFlag {
5555
ProjectBackground,
5656
WorldsTab,
5757
WorldsInHome,
58-
ServersInApp,
5958
ServerProjectQa,
6059
I18nDebug,
6160
}
@@ -131,7 +130,22 @@ impl Settings {
131130
feature_flags: res
132131
.feature_flags
133132
.as_ref()
134-
.and_then(|x| serde_json::from_str(x).ok())
133+
.and_then(|x| {
134+
// to not make deseralization fail from stale feature flags settings
135+
let raw: HashMap<String, bool> =
136+
serde_json::from_str(x).ok()?;
137+
Some(
138+
raw.into_iter()
139+
.filter_map(|(key, value)| {
140+
serde_json::from_value(
141+
serde_json::Value::String(key),
142+
)
143+
.ok()
144+
.map(|feature_flag| (feature_flag, value))
145+
})
146+
.collect(),
147+
)
148+
})
135149
.unwrap_or_default(),
136150
skipped_update: res.skipped_update,
137151
pending_update_toast_for_version: res

0 commit comments

Comments
 (0)