[gnome-software/1754-improve-the-sources-dropdown: 3/10] flatpak: Use GS_APP_QUIRK_BETA_SOURCE




commit 2b8f623b462783b65b73eccb27ea99cde2414f5f
Author: Milan Crha <mcrha redhat com>
Date:   Wed Aug 3 15:52:22 2022 +0200

    flatpak: Use GS_APP_QUIRK_BETA_SOURCE
    
    Set the quirk on an app when its origin or its branch matches some
    heuristic values.

 plugins/flatpak/gs-flatpak.c | 6 ++++++
 1 file changed, 6 insertions(+)
---
diff --git a/plugins/flatpak/gs-flatpak.c b/plugins/flatpak/gs-flatpak.c
index 6f1a391be..15118c7c1 100644
--- a/plugins/flatpak/gs-flatpak.c
+++ b/plugins/flatpak/gs-flatpak.c
@@ -167,6 +167,12 @@ gs_flatpak_set_app_origin (GsFlatpak *self,
                }
        }
 
+       if (g_strcmp0 (origin, "flathub-beta") == 0 ||
+           g_strcmp0 (gs_app_get_branch (app), "devel") == 0 ||
+           g_strcmp0 (gs_app_get_branch (app), "master") == 0 ||
+           (gs_app_get_branch (app) && g_str_has_suffix (gs_app_get_branch (app), "beta")))
+               gs_app_add_quirk (app, GS_APP_QUIRK_BETA_SOURCE);
+
        gs_app_set_origin (app, origin);
        gs_app_set_origin_ui (app, title);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]