@@ -129,8 +129,8 @@ public class Views.Filter : Adw.Bin {
129129 Services . EventBus . get_default (). checked_toggled. connect (valid_checked_item);
130130
131131 Services . EventBus . get_default (). item_moved. connect ((item) = > {
132- if (items. has_key (item. id_string )) {
133- items[item. id_string ]. update_request ();
132+ if (items. has_key (item. id )) {
133+ items[item. id ]. update_request ();
134134 }
135135 });
136136
@@ -190,21 +190,22 @@ public class Views.Filter : Adw.Bin {
190190 }
191191
192192 private void add_item (Objects .Item item ) {
193- items [item. id_string ] = new Layouts .ItemRow (item) {
193+ items [item. id ] = new Layouts .ItemRow (item) {
194194 show_project_label = true
195195 };
196- listbox. append (items [item. id_string]);
196+ items [item. id]. disable_drag_and_drop ();
197+ listbox. append (items [item. id]);
197198 }
198199
199200 private void valid_add_item (Objects .Item item , bool insert = true ) {
200201 if (filter is Objects . Priority ) {
201202 Objects . Priority priority = ((Objects . Priority ) filter);
202203
203- if (! items. has_key (item. id_string ) && item. priority == priority. priority && insert) {
204+ if (! items. has_key (item. id ) && item. priority == priority. priority && insert) {
204205 add_item (item);
205206 }
206207 } else if (filter is Objects . Completed ) {
207- if (! items. has_key (item. id_string ) && item. checked && insert) {
208+ if (! items. has_key (item. id ) && item. checked && insert) {
208209 add_item (item);
209210 }
210211 }
@@ -213,9 +214,9 @@ public class Views.Filter : Adw.Bin {
213214 }
214215
215216 private void valid_delete_item (Objects .Item item ) {
216- if (items. has_key (item. id_string )) {
217- items[item. id_string ]. hide_destroy ();
218- items. unset (item. id_string );
217+ if (items. has_key (item. id )) {
218+ items[item. id ]. hide_destroy ();
219+ items. unset (item. id );
219220 }
220221
221222 validate_placeholder ();
@@ -225,21 +226,21 @@ public class Views.Filter : Adw.Bin {
225226 if (filter is Objects . Priority ) {
226227 Objects . Priority priority = ((Objects . Priority ) filter);
227228
228- if (items. has_key (item. id_string ) && item. priority != priority. priority) {
229- items[item. id_string ]. hide_destroy ();
230- items. unset (item. id_string );
229+ if (items. has_key (item. id ) && item. priority != priority. priority) {
230+ items[item. id ]. hide_destroy ();
231+ items. unset (item. id );
231232 }
232233
233- if (items. has_key (item. id_string ) && ! item. checked) {
234- items[item. id_string ]. hide_destroy ();
235- items. unset (item. id_string );
234+ if (items. has_key (item. id ) && ! item. checked) {
235+ items[item. id ]. hide_destroy ();
236+ items. unset (item. id );
236237 }
237238
238239 valid_add_item (item);
239240 } else if (filter is Objects . Completed ) {
240- if (items. has_key (item. id_string ) && item. checked) {
241- items[item. id_string ]. hide_destroy ();
242- items. unset (item. id_string );
241+ if (items. has_key (item. id ) && item. checked) {
242+ items[item. id ]. hide_destroy ();
243+ items. unset (item. id );
243244 }
244245
245246 valid_add_item (item);
@@ -251,9 +252,9 @@ public class Views.Filter : Adw.Bin {
251252 private void valid_checked_item (Objects .Item item , bool old_checked ) {
252253 if (filter is Objects . Priority ) {
253254 if (! old_checked) {
254- if (items. has_key (item. id_string ) && item. completed) {
255- items[item. id_string ]. hide_destroy ();
256- items. unset (item. id_string );
255+ if (items. has_key (item. id ) && item. completed) {
256+ items[item. id ]. hide_destroy ();
257+ items. unset (item. id );
257258 }
258259 } else {
259260 valid_update_item (item);
@@ -262,9 +263,9 @@ public class Views.Filter : Adw.Bin {
262263 if (! old_checked) {
263264 valid_update_item (item);
264265 } else {
265- if (items. has_key (item. id_string ) && ! item. completed) {
266- items[item. id_string ]. hide_destroy ();
267- items. unset (item. id_string );
266+ if (items. has_key (item. id ) && ! item. completed) {
267+ items[item. id ]. hide_destroy ();
268+ items. unset (item. id );
268269 }
269270 }
270271 }
0 commit comments