[gnome-software/1630-new-updated-apps-are-not-actually-new: 4/9] gs-plugin-loader: Filter out non-desktop apps from get-recent action
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/1630-new-updated-apps-are-not-actually-new: 4/9] gs-plugin-loader: Filter out non-desktop apps from get-recent action
- Date: Fri, 25 Feb 2022 11:26:47 +0000 (UTC)
commit 043d9201b415ef17f839580a7adc39f3e5e67b19
Author: Milan Crha <mcrha redhat com>
Date: Thu Feb 24 13:04:21 2022 +0100
gs-plugin-loader: Filter out non-desktop apps from get-recent action
There can be also runtimes, extensions and so on recently released,
but these should not be shown in the 'New & Updated' section.
lib/gs-plugin-loader.c | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 6c65e41fa..b40c99ff2 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -1121,6 +1121,12 @@ gs_plugin_loader_app_is_non_compulsory (GsApp *app, gpointer user_data)
return !gs_app_has_quirk (app, GS_APP_QUIRK_COMPULSORY);
}
+static gboolean
+gs_plugin_loader_app_is_desktop (GsApp *app, gpointer user_data)
+{
+ return gs_app_get_kind (app) == AS_COMPONENT_KIND_DESKTOP_APP;
+}
+
static gboolean
gs_plugin_loader_get_app_is_compatible (GsApp *app, gpointer user_data)
{
@@ -3364,6 +3370,7 @@ gs_plugin_loader_process_thread_cb (GTask *task,
break;
case GS_PLUGIN_ACTION_GET_RECENT:
gs_app_list_filter (list, gs_plugin_loader_app_is_non_compulsory, NULL);
+ gs_app_list_filter (list, gs_plugin_loader_app_is_desktop, NULL);
gs_app_list_filter (list, gs_plugin_loader_app_is_valid_filter, helper);
gs_app_list_filter (list, gs_plugin_loader_filter_qt_for_gtk, NULL);
gs_app_list_filter (list, gs_plugin_loader_get_app_is_compatible, plugin_loader);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]