chore: visually distinguish between pinned and unpinned events in overlay header

This commit is contained in:
ggurdin 2025-06-18 13:06:15 -04:00
parent f997e58526
commit ab7df42fbf
No known key found for this signature in database
GPG key ID: A01CB41737CBB478
2 changed files with 10 additions and 3 deletions

View file

@ -191,7 +191,9 @@ class ChatView extends StatelessWidget {
appbarBottomHeight += ChatAppBarListTile.fixedHeight;
}
// #Pangea
if (controller.room.activityPlan != null) {
if (controller.room.activityPlan != null &&
controller.room.activityPlan!.endAt != null &&
controller.room.activityPlan!.endAt!.isAfter(DateTime.now())) {
appbarBottomHeight += ChatAppBarListTile.fixedHeight;
}
// Pangea#

View file

@ -36,6 +36,9 @@ class OverlayHeaderState extends State<OverlayHeader> {
Widget build(BuildContext context) {
final l10n = L10n.of(context);
final theme = Theme.of(context);
final pinned = controller.room.pinnedEventIds.contains(
controller.selectedEvents.first.eventId,
);
return Container(
padding: const EdgeInsets.symmetric(horizontal: 10),
decoration: BoxDecoration(
@ -102,9 +105,11 @@ class OverlayHeaderState extends State<OverlayHeader> {
),
if (controller.canPinSelectedEvents)
IconButton(
icon: const Icon(Icons.push_pin_outlined),
icon: pinned
? const Icon(Icons.push_pin)
: const Icon(Icons.push_pin_outlined),
onPressed: controller.pinEvent,
tooltip: l10n.pinMessage,
tooltip: pinned ? l10n.unpin : l10n.pinMessage,
color: theme.colorScheme.primary,
),
if (controller.canEditSelectedEvents &&