[gnome-software: 18/38] gs-shell: Rework how refresh events are detected
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [gnome-software: 18/38] gs-shell: Rework how refresh events are detected
- Date: Thu,  3 Mar 2022 16:39:53 +0000 (UTC)
commit fe03bfe6707ea542b44314cbc51d3467f043ab13
Author: Philip Withnall <pwithnall endlessos org>
Date:   Sun Feb 20 17:06:32 2022 +0000
    gs-shell: Rework how refresh events are detected
    
    `GS_PLUGIN_ACTION_REFRESH` is going away.
    
    Signed-off-by: Philip Withnall <pwithnall endlessos org>
    
    Helps: #1472
 src/gs-shell.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 214a201c3..411f5411b 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -2058,6 +2058,7 @@ gs_shell_show_event (GsShell *shell, GsPluginEvent *event)
 {
        const GError *error;
        GsPluginAction action;
+       GsPluginJob *job;
 
        /* get error */
        error = gs_plugin_event_get_error (event);
@@ -2071,10 +2072,13 @@ gs_shell_show_event (GsShell *shell, GsPluginEvent *event)
                return TRUE;
        }
 
+       job = gs_plugin_event_get_job (event);
+       if (GS_IS_PLUGIN_JOB_REFRESH_METADATA (job))
+               return gs_shell_show_event_refresh (shell, event);
+
        /* split up the events by action */
        action = gs_plugin_event_get_action (event);
        switch (action) {
-       case GS_PLUGIN_ACTION_REFRESH:
        case GS_PLUGIN_ACTION_DOWNLOAD:
                return gs_shell_show_event_refresh (shell, event);
        case GS_PLUGIN_ACTION_INSTALL:
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]