Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 46 additions & 62 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ syn = {version = "=2.0.117"}
thiserror = {version = "=2.0.18"}

# ui
freya = {version = "=0.5.0-rc.1", features = ["engine", "winit", "router", "remote-asset", "sdk", "markdown", "query", "radio", "titlebar"]}
freya = {version = "=0.5.0-rc.3", features = ["engine", "winit", "router", "remote-asset", "sdk", "markdown", "query", "radio", "titlebar"]}
freya-skia-safe = "=0.98.1" # required for the SKSL player renderer
image = {version = "=0.25.10", default-features = false, features = ["png", "jpeg"]}

Expand Down
10 changes: 4 additions & 6 deletions packages/oneclient_app/src/hooks/queries/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,15 +113,13 @@ pub fn try_account(query: &UseQuery<AccountQuery>) -> Option<MinecraftAccount> {
}

async fn invalidate_auth_queries(account_id: Option<Uuid>) {
QueriesStorage::<ListAccountsQuery>::try_invalidate_matching(ListAccountsKeys).await;
QueriesStorage::<ListAccountsQuery>::invalidate_matching(ListAccountsKeys).await;
for fallback in [false, true] {
QueriesStorage::<DefaultAccountQuery>::try_invalidate_matching(DefaultAccountKeys {
fallback,
})
.await;
QueriesStorage::<DefaultAccountQuery>::invalidate_matching(DefaultAccountKeys { fallback })
.await;
}
if let Some(id) = account_id {
QueriesStorage::<AccountQuery>::try_invalidate_matching(AccountKeys { id }).await;
QueriesStorage::<AccountQuery>::invalidate_matching(AccountKeys { id }).await;
}
}

Expand Down
5 changes: 2 additions & 3 deletions packages/oneclient_app/src/hooks/queries/image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,10 @@ pub fn loaded_image(url: Option<&str>, query: &UseQuery<CachedImageQuery>) -> Op

pub fn use_cached_image(url: Option<String>, max_edge: u32) -> UseQuery<CachedImageQuery> {
let url = url.unwrap_or_default();
let enabled = !url.is_empty();
let keys = (!url.is_empty()).then_some(CachedImageKeys { url, max_edge });

use_query(
Query::new(CachedImageKeys { url, max_edge }, CachedImageQuery)
.enable(enabled)
Query::new(keys, CachedImageQuery)
.stale_time(IMAGE_STALE)
.clean_time(IMAGE_CLEAN),
)
Expand Down
2 changes: 1 addition & 1 deletion packages/oneclient_app/src/hooks/queries/java.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pub fn java_runtimes(query: &UseQuery<ListJavaRuntimesQuery>) -> Vec<JavaRuntime
}

pub async fn invalidate_java_queries() {
QueriesStorage::<ListJavaRuntimesQuery>::try_invalidate_all().await;
QueriesStorage::<ListJavaRuntimesQuery>::invalidate_all().await;
}

#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
Expand Down
4 changes: 2 additions & 2 deletions packages/oneclient_app/src/hooks/queries/logs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ pub fn try_log_content(query: &UseQuery<LogContentQuery>) -> Option<Vec<LogLine>
}

pub async fn invalidate_logs_queries() {
QueriesStorage::<ClusterLogsQuery>::try_invalidate_all().await;
QueriesStorage::<LogContentQuery>::try_invalidate_all().await;
QueriesStorage::<ClusterLogsQuery>::invalidate_all().await;
QueriesStorage::<LogContentQuery>::invalidate_all().await;
}

#[derive(Clone, Debug, PartialEq, Eq, Hash)]
Expand Down
Loading