Skip to content

Commit

Permalink
Merge pull request #2285 from bitfriend/chat-read-receipt
Browse files Browse the repository at this point in the history
[smallfix] Miscellaneous fixings
  • Loading branch information
bitfriend authored Oct 17, 2024
2 parents 775f6f0 + 850ff13 commit 3d08912
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
5 changes: 4 additions & 1 deletion app/lib/common/widgets/sliver_scaffold.dart
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ class _SliverFooter extends StatelessWidget {
}

void onCancel(BuildContext context) {
cancelActionOnPressed.map((cb) => cb()) ?? Navigator.pop(context);
cancelActionOnPressed.map(
(cb) => cb(),
orElse: () => Navigator.pop(context),
);
}
}
16 changes: 10 additions & 6 deletions app/lib/features/events/pages/create_event_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -94,14 +94,18 @@ class CreateEventPageConsumerState extends ConsumerState<CreateEventPage> {
@override
void initState() {
super.initState();
widget.templateEvent.map((p0) {
WidgetsBinding.instance
.addPostFrameCallback((Duration dur) => _setFromTemplate(p0));
}) ??
widget.templateEvent.map(
(p0) => WidgetsBinding.instance.addPostFrameCallback((Duration dur) {
_setFromTemplate(p0);
}),
orElse: () {
widget.initialSelectedSpace.map((p0) {
WidgetsBinding.instance
.addPostFrameCallback((Duration dur) => _setSpaceId(p0));
WidgetsBinding.instance.addPostFrameCallback((Duration dur) {
_setSpaceId(p0);
});
});
},
);
}

@override
Expand Down
12 changes: 7 additions & 5 deletions app/lib/features/events/widgets/event_item.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,13 @@ class EventItem extends StatelessWidget {
return InkWell(
onTap: () {
final eventId = event.eventId().toString();
onTapEventItem.map((cb) => cb(eventId)) ??
context.pushNamed(
Routes.calendarEvent.name,
pathParameters: {'calendarId': eventId},
);
onTapEventItem.map(
(cb) => cb(eventId),
orElse: () => context.pushNamed(
Routes.calendarEvent.name,
pathParameters: {'calendarId': eventId},
),
);
},
child: Stack(
alignment: Alignment.topLeft,
Expand Down

0 comments on commit 3d08912

Please sign in to comment.