Fixed failling tests
This commit is contained in:
parent
ea39983f78
commit
2802e3a1c6
3 changed files with 6 additions and 7 deletions
|
@ -149,12 +149,11 @@ impl UserStore {
|
||||||
);
|
);
|
||||||
|
|
||||||
cx.update(|cx| {
|
cx.update(|cx| {
|
||||||
cx.update_global::<StaffMode, _, _>(|staff_mode, _| {
|
cx.set_global(
|
||||||
*staff_mode = info
|
info.as_ref()
|
||||||
.as_ref()
|
|
||||||
.map(|info| StaffMode(info.staff))
|
.map(|info| StaffMode(info.staff))
|
||||||
.unwrap_or(StaffMode(false));
|
.unwrap_or(StaffMode(false)),
|
||||||
})
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
current_user_tx.send(user).await.ok();
|
current_user_tx.send(user).await.ok();
|
||||||
|
|
|
@ -45,7 +45,7 @@ impl ThemeSelector {
|
||||||
let original_theme = settings.theme.clone();
|
let original_theme = settings.theme.clone();
|
||||||
|
|
||||||
let mut theme_names = registry
|
let mut theme_names = registry
|
||||||
.list(**cx.global::<StaffMode>())
|
.list(**cx.try_global::<StaffMode>().unwrap_or(&StaffMode(false)))
|
||||||
.collect::<Vec<_>>();
|
.collect::<Vec<_>>();
|
||||||
theme_names.sort_unstable_by(|a, b| {
|
theme_names.sort_unstable_by(|a, b| {
|
||||||
a.is_light
|
a.is_light
|
||||||
|
|
|
@ -303,7 +303,7 @@ pub fn initialize_workspace(
|
||||||
|
|
||||||
let theme_names = app_state
|
let theme_names = app_state
|
||||||
.themes
|
.themes
|
||||||
.list(**cx.global::<StaffMode>())
|
.list(**cx.try_global::<StaffMode>().unwrap_or(&StaffMode(false)))
|
||||||
.map(|meta| meta.name)
|
.map(|meta| meta.name)
|
||||||
.collect();
|
.collect();
|
||||||
let language_names = app_state.languages.language_names();
|
let language_names = app_state.languages.language_names();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue