Skip to content

Commit 74f58c7

Browse files
committed
updates: Subscribe to updates correctly
If done too soon it won't work, and the Progress signal will never be emitted on the other side. Fixes: #37
1 parent 44e27ad commit 74f58c7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

libportal/updates.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ monitor_created (GObject *object,
156156
else
157157
{
158158
call->portal->update_monitor_handle = g_strdup (call->id);
159-
ensure_update_monitor_connection (call->portal);
160159
g_task_return_boolean (call->task, TRUE);
161160
}
162161

@@ -343,7 +342,10 @@ update_started (GObject *object,
343342
if (error)
344343
g_task_return_error (call->task, error);
345344
else
346-
g_task_return_boolean (call->task, TRUE);
345+
{
346+
ensure_update_monitor_connection (call->portal);
347+
g_task_return_boolean (call->task, TRUE);
348+
}
347349

348350
install_update_call_free (call);
349351
}

0 commit comments

Comments
 (0)