[gnome-software/1630-new-updated-apps-are-not-actually-new: 7/9] gs-appstream: Use the passed-in 'age' argument




commit d44aa380ade47be03e1f14fe07540cce4d1ff617
Author: Milan Crha <mcrha redhat com>
Date:   Fri Feb 25 12:23:20 2022 +0100

    gs-appstream: Use the passed-in 'age' argument
    
    ...rather than hard-code the recent limit to 30 days.

 lib/gs-appstream.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/lib/gs-appstream.c b/lib/gs-appstream.c
index 861d1d6dc..919349d9f 100644
--- a/lib/gs-appstream.c
+++ b/lib/gs-appstream.c
@@ -1606,7 +1606,7 @@ gs_appstream_add_recent (GsPlugin *plugin,
        /* use predicate conditions to the max */
        xpath = g_strdup_printf ("components/component/releases/"
                                 "release[@timestamp>%" G_GUINT64_FORMAT "]/../..",
-                                now - (30 * 24 * 60 * 60));
+                                now - age);
        array = xb_silo_query (silo, xpath, 0, &error_local);
        if (array == NULL) {
                if (g_error_matches (error_local, G_IO_ERROR, G_IO_ERROR_NOT_FOUND))


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