Race in Block Contact GtkCheckMenuItem
Submitted by Danielle Madeley
Link to original bug (#644472)
Description
The GtkCheckMenuItem for block contact doesn't always show the current block state of a contact due to a race between when the menu is rebuilt and when the asynchronous operation for blocking completes.
This bit of code is useless:
/* update the toggle with the blocked status */
block_signal++;
gtk_check_menu_item_set_active (item, blocked);
block_signal--;
Because the menu rebuilds almost immediately at which point empathy_contact_list_get_blocked() probably still returns the old value.
~
This should probably be fixed by creating a "blocked" property on EmpathyContact that updates in response to ::group-members-changed on the 'deny' channel. We can then bind the value of the "blocked" property to the "active" property on the GtkCheckMenuItem. And make ::toggled not do anything if the contact is already blocked/unblocked.
Version: 2.33.x