[gnome-software: 8/11] gs-details-page: Port ACTION_GET_ALTERNATES to use GsPluginJobListApps
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software: 8/11] gs-details-page: Port ACTION_GET_ALTERNATES to use GsPluginJobListApps
- Date: Mon, 11 Jul 2022 11:57:03 +0000 (UTC)
commit 302abcb39f25c3aa2c332ffe9f94e0f4c1795cbd
Author: Philip Withnall <pwithnall endlessos org>
Date: Wed Jul 6 15:24:22 2022 +0100
gs-details-page: Port ACTION_GET_ALTERNATES to use GsPluginJobListApps
Signed-off-by: Philip Withnall <pwithnall endlessos org>
src/gs-details-page.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 0fd15dcdb..a35a4e967 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1605,6 +1605,7 @@ gs_details_page_load_stage2 (GsDetailsPage *self,
gboolean continue_loading)
{
g_autofree gchar *tmp = NULL;
+ g_autoptr(GsAppQuery) query = NULL;
g_autoptr(GsPluginJob) plugin_job1 = NULL;
g_autoptr(GsPluginJob) plugin_job2 = NULL;
gboolean is_online = gs_plugin_loader_get_network_available (self->plugin_loader);
@@ -1633,12 +1634,14 @@ gs_details_page_load_stage2 (GsDetailsPage *self,
GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEW_RATINGS |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_REVIEWS |
GS_PLUGIN_REFINE_FLAGS_REQUIRE_SIZE);
- plugin_job2 = gs_plugin_job_newv (GS_PLUGIN_ACTION_GET_ALTERNATES,
- "interactive", TRUE,
- "app", self->app,
- "refine-flags", GS_DETAILS_PAGE_REFINE_FLAGS,
- "dedupe-flags", GS_APP_LIST_FILTER_FLAG_NONE,
- NULL);
+
+ query = gs_app_query_new ("alternate-of", self->app,
+ "refine-flags", GS_DETAILS_PAGE_REFINE_FLAGS,
+ "dedupe-flags", GS_APP_LIST_FILTER_FLAG_NONE,
+ "sort-func", gs_utils_app_sort_priority,
+ NULL);
+ plugin_job2 = gs_plugin_job_list_apps_new (query, GS_PLUGIN_LIST_APPS_FLAGS_INTERACTIVE);
+
gs_plugin_loader_job_process_async (self->plugin_loader, plugin_job1,
self->cancellable,
gs_details_page_app_refine_cb,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]