mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-01-14 05:03:29 +01:00
[PR #189] [MERGED] Queries now use AppHandle instead of Window #114
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/mountain-loop/yaak/pull/189
Author: @gschier
Created: 3/20/2025
Status: ✅ Merged
Merged: 3/20/2025
Merged by: @gschier
Base:
master← Head:queries-to-apphandle📝 Commits (1)
31377cequeries no longer need window📊 Changes
19 files changed (+1023 additions, -700 deletions)
View changed files
📝
src-tauri/src/history.rs(+19 -13)📝
src-tauri/src/http_request.rs(+82 -28)📝
src-tauri/src/lib.rs(+386 -219)📝
src-tauri/src/notifications.rs(+12 -10)📝
src-tauri/src/plugin_events.rs(+6 -6)📝
src-tauri/yaak-license/src/license.rs(+13 -9)📝
src-tauri/yaak-models/bindings/gen_models.ts(+2 -2)📝
src-tauri/yaak-models/src/error.rs(+6 -0)📝
src-tauri/yaak-models/src/lib.rs(+1 -0)➕
src-tauri/yaak-models/src/manager.rs(+40 -0)📝
src-tauri/yaak-models/src/queries.rs(+305 -286)📝
src-tauri/yaak-sync/src/commands.rs(+11 -11)📝
src-tauri/yaak-sync/src/sync.rs(+31 -26)📝
src-tauri/yaak-templates/src/renderer.rs(+2 -9)📝
src-tauri/yaak-ws/src/commands.rs(+58 -41)📝
src-web/components/GrpcConnectionSetupPane.tsx(+8 -7)📝
src-web/components/HttpRequestPane.tsx(+13 -10)📝
src-web/components/WebsocketRequestPane.tsx(+11 -9)📝
src-web/hooks/useSyncModelStores.ts(+17 -14)📄 Description
This PR changes DB queries to only use AppHandle instead of Window. Window was used to attach the label to the frontend event, so I moved the label to the
UpdateContextenum instead. Having access to a Window for any DB modifications was quite a limitation, so now the API is usable from more places🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.