diff --git a/lib/pages/chat/chat.dart b/lib/pages/chat/chat.dart index 65dc88ad2..e0067703f 100644 --- a/lib/pages/chat/chat.dart +++ b/lib/pages/chat/chat.dart @@ -1138,8 +1138,14 @@ class ChatController extends State inputFocus.requestFocus(); } - void scrollToEventId(String eventId) async { - final eventIndex = timeline!.events.indexWhere((e) => e.eventId == eventId); + void scrollToEventId( + String eventId, { + bool highlightEvent = true, + }) async { + final eventIndex = timeline!.events + .where((event) => event.isVisibleInGui) + .toList() + .indexWhere((e) => e.eventId == eventId); if (eventIndex == -1) { setState(() { timeline = null; @@ -1155,11 +1161,14 @@ class ChatController extends State }); return; } - setState(() { - scrollToEventIdMarker = eventId; - }); + if (highlightEvent) { + setState(() { + scrollToEventIdMarker = eventId; + }); + } await scrollController.scrollToIndex( - eventIndex, + eventIndex + 1, + duration: FluffyThemes.animationDuration, preferPosition: AutoScrollPosition.middle, ); _updateScrollController(); diff --git a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart index 19e4a524d..ef79c0e31 100644 --- a/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart +++ b/lib/pages/user_bottom_sheet/user_bottom_sheet_view.dart @@ -370,15 +370,17 @@ class UserBottomSheetView extends StatelessWidget { onTap: () => controller .participantAction(UserBottomSheetAction.unban), ), - if (user != null && user.id != client.userID) - ListTile( - textColor: Theme.of(context).colorScheme.onErrorContainer, - iconColor: Theme.of(context).colorScheme.onErrorContainer, - title: Text(L10n.of(context)!.reportUser), - leading: const Icon(Icons.report_outlined), - onTap: () => controller - .participantAction(UserBottomSheetAction.report), - ), + // #Pangea + // if (user != null && user.id != client.userID) + // ListTile( + // textColor: Theme.of(context).colorScheme.onErrorContainer, + // iconColor: Theme.of(context).colorScheme.onErrorContainer, + // title: Text(L10n.of(context)!.reportUser), + // leading: const Icon(Icons.report_outlined), + // onTap: () => controller + // .participantAction(UserBottomSheetAction.report), + // ), + // Pangea# if (profileSearchError != null) ListTile( leading: const Icon(