@@ -44,7 +44,12 @@ public class Objects.Filters.Pinboard : Objects.BaseObject {
44
44
}
45
45
}
46
46
47
- public signal void pinboard_count_updated ();
47
+ public signal void pinboard_count_updated (); // This is used in FilterPaneRow.vala:157 for updating the count label
48
+
49
+ private void update_pinboard_count () {
50
+ _pinboard_count = Services . Store . instance (). get_items_pinned (false ). size;
51
+ pinboard_count_updated ();
52
+ }
48
53
49
54
construct {
50
55
name = (" Pinboard" );
@@ -53,28 +58,27 @@ public class Objects.Filters.Pinboard : Objects.BaseObject {
53
58
view_id = FilterType . PINBOARD. to_string ();
54
59
55
60
Services . Store . instance (). item_added. connect (() = > {
56
- _pinboard_count = Services . Store . instance (). get_items_pinned (false ). size;
57
- pinboard_count_updated ();
61
+ update_pinboard_count ();
58
62
});
59
63
60
64
Services . Store . instance (). item_deleted. connect (() = > {
61
- _pinboard_count = Services . Store . instance (). get_items_pinned (false ). size;
62
- pinboard_count_updated ();
65
+ update_pinboard_count ();
63
66
});
64
67
65
68
Services . Store . instance (). item_updated. connect (() = > {
66
- _pinboard_count = Services . Store . instance (). get_items_pinned (false ). size;
67
- pinboard_count_updated ();
69
+ update_pinboard_count ();
68
70
});
69
71
70
72
Services . Store . instance (). item_archived. connect (() = > {
71
- _pinboard_count = Services . Store . instance (). get_items_pinned (false ). size;
72
- pinboard_count_updated ();
73
+ update_pinboard_count ();
73
74
});
74
75
75
76
Services . Store . instance (). item_unarchived. connect (() = > {
76
- _pinboard_count = Services . Store . instance (). get_items_pinned (false ). size;
77
- pinboard_count_updated ();
77
+ update_pinboard_count ();
78
+ });
79
+
80
+ Services . Store . instance (). item_pin_change. connect (() = > {
81
+ update_pinboard_count ();
78
82
});
79
83
}
80
84
}
0 commit comments