Merge pull request #3141 from pangeachat/3137-no-differentiation-between-pinned-and-unpinned

chore: visually distinguish between pinned and unpinned events in ove…
This commit is contained in:
ggurdin 2025-06-18 13:07:01 -04:00 committed by GitHub
commit 6f82808c8e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
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 &&