[gnome-software] odrs: Mark new reviews as AS_REVIEW_FLAG_SELF



commit 4d53379597dd1a033380cdeb2da08aeceb7ea851
Author: Philip Withnall <withnall endlessm com>
Date:   Wed Dec 4 14:22:26 2019 +0000

    odrs: Mark new reviews as AS_REVIEW_FLAG_SELF
    
    Otherwise they are shown alongside buttons for upvoting, downvoting and
    reporting them, which isn’t appropriate for reviews the user has written
    themselves.
    
    This brings newly-created reviews in line with those downloaded from the
    ODRS server.
    
    Signed-off-by: Philip Withnall <withnall endlessm com>
    
    Fixes: #57

 plugins/odrs/gs-plugin-odrs.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/plugins/odrs/gs-plugin-odrs.c b/plugins/odrs/gs-plugin-odrs.c
index 39c605ec..e0264b86 100644
--- a/plugins/odrs/gs-plugin-odrs.c
+++ b/plugins/odrs/gs-plugin-odrs.c
@@ -820,6 +820,7 @@ gs_plugin_review_submit (GsPlugin *plugin,
        g_autoptr(JsonNode) json_root = NULL;
 
        /* save as we don't re-request the review from the server */
+       as_review_add_flags (review, AS_REVIEW_FLAG_SELF);
        as_review_set_reviewer_name (review, g_get_real_name ());
        as_review_add_metadata (review, "app_id", gs_app_get_id (app));
        as_review_add_metadata (review, "user_skey",


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