3607 pinned message highlight persists after unpinning (#3611)

* fix: unhighlight messages on unpin

* remove unnecessary setState

* reset scroll marker when unpinned to remove highlight
This commit is contained in:
avashilling 2025-08-01 14:31:05 -04:00 committed by GitHub
parent f19d717e87
commit e58529ffc7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1795,6 +1795,13 @@ class ChatController extends State<ChatPageWithRoom>
if (response == OkCancelResult.ok) {
final events = room.pinnedEventIds
..removeWhere((oldEvent) => oldEvent == eventId);
// #Pangea
if (scrollToEventIdMarker == eventId) {
setState(() {
scrollToEventIdMarker = null;
});
}
// Pangea#
showFutureLoadingDialog(
context: context,
future: () => room.setPinnedEvents(events),