summary refs log tree commit diff
path: root/src/components
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-08-25 13:34:43 +0300
committerVika <vika@fireburn.ru>2024-08-25 13:34:43 +0300
commit19585ee11171942f096104c26045fe33727752c1 (patch)
tree09327e13a0203dbc177f37d88ccdb6f7789952fd /src/components
parent847648330cc0e7af59fa6923f45222726d404250 (diff)
downloadbowl-19585ee11171942f096104c26045fe33727752c1.tar.zst
Bring child components onto the top-level and use a single SoupSession
This helps unify HTTP-related settings in one place.

In Relm4 Matrix chatroom, it was said that deconstructing child
components makes little sense in terms of optimizations.
Diffstat (limited to 'src/components')
-rw-r--r--src/components/signin.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/signin.rs b/src/components/signin.rs
index 159711e..c595bde 100644
--- a/src/components/signin.rs
+++ b/src/components/signin.rs
@@ -181,7 +181,7 @@ impl AsyncComponent for SignIn {
     type Input = Input;
     type Output = Output;
     /// Client ID for authorizing.
-    type Init = glib::Uri;
+    type Init = (glib::Uri, soup::Session);
 
     view! {
         #[root]
@@ -254,10 +254,10 @@ impl AsyncComponent for SignIn {
         sender: AsyncComponentSender<Self>,
     ) -> impl std::future::Future<Output = AsyncComponentParts<Self>> {
         let model = Self {
-            client_id: init,
+            client_id: init.0,
             me_buffer: Default::default(),
 
-            http: soup::Session::new(),
+            http: init.1,
             callback_server: None,
             busy_guard: None,