Skip to content

Update room-list headings on section updates, not on moving rows

Nicolas Guichard requested to merge guicharn/ruqola:fix-section-updates into master

Previously RoomListHeadingsProxyModel relied on RoomFilterProxyModel::rowMoved to update the headings when a room changed section.

This does not work when the room is changing section but is not actually moved excluding the headers. For instance if we have this room list:

 Rooms
  # all
  # dev

then set all as favorite, we expect:

 Favorites
  # all
 Rooms
  # dev

but instead, as favoriting all doesn't actually trigger rowMoved in RoomFilterProxyModel (which doesn't know about the headings), RoomListHeadingsProxyModel is never marked dirty and we stay with:

 Rooms
  # all
  # dev

The fix is simply to listen for row section changes instead of position changes.

Merge request reports