explore: Fix crash when removing non-existant item

Fixes #805
This commit is contained in:
Kévin Commaille 2021-12-25 16:44:32 +01:00 committed by Julian Sparber
parent 01633280e5
commit fbc867e031

View file

@ -240,7 +240,11 @@ impl PublicRoomList {
(position - 1, 0, added) (position - 1, 0, added)
} }
} else { } else {
(position, 1, added) if position == 0 {
(position, 0, added)
} else {
(position - 1, 1, added)
}
} }
}; };