chore: visually distinguish between pinned and unpinned events in overlay header
This commit is contained in:
parent
f997e58526
commit
ab7df42fbf
2 changed files with 10 additions and 3 deletions
|
|
@ -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#
|
||||
|
|
|
|||
|
|
@ -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 &&
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue