[gnome-software: 2/7] gs-app-list: Drop GS_APP_LIST_FLAG_IS_RANDOMIZED




commit 10109203b810ab72a0e5db44da7dcc6f095d5dd1
Author: Philip Withnall <pwithnall endlessos org>
Date:   Tue May 24 15:43:34 2022 +0100

    gs-app-list: Drop GS_APP_LIST_FLAG_IS_RANDOMIZED
    
    It was set but never read.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>

 lib/gs-app-list-private.h | 3 +--
 lib/gs-app-list.c         | 3 ---
 lib/gs-plugin-loader.c    | 2 --
 3 files changed, 1 insertion(+), 7 deletions(-)
---
diff --git a/lib/gs-app-list-private.h b/lib/gs-app-list-private.h
index e05febb1b..53351738b 100644
--- a/lib/gs-app-list-private.h
+++ b/lib/gs-app-list-private.h
@@ -15,7 +15,6 @@ G_BEGIN_DECLS
 /**
  * GsAppListFlags:
  * @GS_APP_LIST_FLAG_NONE:                     No flags set
- * @GS_APP_LIST_FLAG_IS_RANDOMIZED:            List has been randomized
  * @GS_APP_LIST_FLAG_IS_TRUNCATED:             List has been truncated
  * @GS_APP_LIST_FLAG_WATCH_APPS:               Applications will be monitored
  * @GS_APP_LIST_FLAG_WATCH_APPS_RELATED:       Applications related apps will be monitored
@@ -25,7 +24,7 @@ G_BEGIN_DECLS
  **/
 typedef enum {
        GS_APP_LIST_FLAG_NONE                   = 0,
-       GS_APP_LIST_FLAG_IS_RANDOMIZED          = 1 << 0,
+       /* empty slot */
        GS_APP_LIST_FLAG_IS_TRUNCATED           = 1 << 1,
        GS_APP_LIST_FLAG_WATCH_APPS             = 1 << 2,
        GS_APP_LIST_FLAG_WATCH_APPS_RELATED     = 1 << 3,
diff --git a/lib/gs-app-list.c b/lib/gs-app-list.c
index 1de573e1c..404d1b91e 100644
--- a/lib/gs-app-list.c
+++ b/lib/gs-app-list.c
@@ -741,9 +741,6 @@ gs_app_list_randomize (GsAppList *list)
 
        locker = g_mutex_locker_new (&list->mutex);
 
-       /* mark this list as random */
-       list->flags |= GS_APP_LIST_FLAG_IS_RANDOMIZED;
-
        key = g_strdup_printf ("Plugin::sort-key[%p]", list);
        rand = g_rand_new ();
        date = g_date_time_new_now_utc ();
diff --git a/lib/gs-plugin-loader.c b/lib/gs-plugin-loader.c
index 9f07e008f..eda20cca3 100644
--- a/lib/gs-plugin-loader.c
+++ b/lib/gs-plugin-loader.c
@@ -3290,8 +3290,6 @@ gs_plugin_loader_inherit_list_props (GsAppList *des_list,
 {
        if (gs_app_list_has_flag (src_list, GS_APP_LIST_FLAG_IS_TRUNCATED))
                gs_app_list_add_flag (des_list, GS_APP_LIST_FLAG_IS_TRUNCATED);
-       if (gs_app_list_has_flag (src_list, GS_APP_LIST_FLAG_IS_RANDOMIZED))
-               gs_app_list_add_flag (des_list, GS_APP_LIST_FLAG_IS_RANDOMIZED);
 
        gs_app_list_set_size_peak (des_list, gs_app_list_get_size_peak (src_list));
 }


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