[gnome-games] collection-view: Exit selection mode only for favorites collection
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] collection-view: Exit selection mode only for favorites collection
- Date: Fri, 31 Jul 2020 11:25:46 +0000 (UTC)
commit de0ce0c48b683e092b410c8572be5c48d1f06095
Author: Neville <nevilleantony98 gmail com>
Date: Wed Jul 29 16:53:16 2020 +0530
collection-view: Exit selection mode only for favorites collection
Exit selection mode on favorite action only for Favorites collection.
This lets other collections have favorite action behavior like in
every other place other than Favorites collection.
src/ui/collection-view.vala | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
---
diff --git a/src/ui/collection-view.vala b/src/ui/collection-view.vala
index 8aa79f529..665c219ef 100644
--- a/src/ui/collection-view.vala
+++ b/src/ui/collection-view.vala
@@ -347,11 +347,13 @@ private class Games.CollectionView : Gtk.Box, UiView {
else {
collection_manager.toggle_favorite (collections_page.get_selected_games ());
- collections_page.update_is_collection_empty ();
- select_none ();
- toggle_select ();
-
- return;
+ var current_collection = collections_page.get_current_collection ();
+ if (current_collection != null && current_collection.get_id () == "Favorites") {
+ collections_page.update_is_collection_empty ();
+ select_none ();
+ toggle_select ();
+ return;
+ }
}
update_selection_action_bar ();
@@ -364,6 +366,8 @@ private class Games.CollectionView : Gtk.Box, UiView {
games = games_page.get_selected_games ();
else if (viewstack.visible_child == platforms_page)
games = platforms_page.get_selected_games ();
+ else
+ games = collections_page.get_selected_games ();
selection_action_bar.update (games);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]