TF-3871 Fix blue bar displays wrongly who proposed the event counter
This commit is contained in:
@@ -304,6 +304,7 @@ class EmailView extends GetWidget<SingleEmailController> {
|
|||||||
children: [
|
children: [
|
||||||
Obx(() => CalendarEventInformationWidget(
|
Obx(() => CalendarEventInformationWidget(
|
||||||
calendarEvent: calendarEvent,
|
calendarEvent: calendarEvent,
|
||||||
|
imagePaths: controller.imagePaths,
|
||||||
onOpenComposerAction: controller.openNewComposerAction,
|
onOpenComposerAction: controller.openNewComposerAction,
|
||||||
onOpenNewTabAction: controller.openNewTabAction,
|
onOpenNewTabAction: controller.openNewTabAction,
|
||||||
onCalendarEventReplyActionClick: (eventActionType) =>
|
onCalendarEventReplyActionClick: (eventActionType) =>
|
||||||
|
|||||||
+8
-1
@@ -1,4 +1,5 @@
|
|||||||
import 'package:core/presentation/extensions/color_extension.dart';
|
import 'package:core/presentation/extensions/color_extension.dart';
|
||||||
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
import 'package:core/presentation/utils/theme_utils.dart';
|
import 'package:core/presentation/utils/theme_utils.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:jmap_dart_client/jmap/mail/calendar/calendar_event.dart';
|
import 'package:jmap_dart_client/jmap/mail/calendar/calendar_event.dart';
|
||||||
@@ -24,6 +25,7 @@ typedef OnOpenComposerAction = void Function(String emailAddress);
|
|||||||
class CalendarEventInformationWidget extends StatelessWidget {
|
class CalendarEventInformationWidget extends StatelessWidget {
|
||||||
|
|
||||||
final CalendarEvent calendarEvent;
|
final CalendarEvent calendarEvent;
|
||||||
|
final ImagePaths imagePaths;
|
||||||
final OnOpenNewTabAction? onOpenNewTabAction;
|
final OnOpenNewTabAction? onOpenNewTabAction;
|
||||||
final OnOpenComposerAction? onOpenComposerAction;
|
final OnOpenComposerAction? onOpenComposerAction;
|
||||||
final OnCalendarEventReplyActionClick onCalendarEventReplyActionClick;
|
final OnCalendarEventReplyActionClick onCalendarEventReplyActionClick;
|
||||||
@@ -39,6 +41,7 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
|||||||
const CalendarEventInformationWidget({
|
const CalendarEventInformationWidget({
|
||||||
super.key,
|
super.key,
|
||||||
required this.calendarEvent,
|
required this.calendarEvent,
|
||||||
|
required this.imagePaths,
|
||||||
required this.onCalendarEventReplyActionClick,
|
required this.onCalendarEventReplyActionClick,
|
||||||
required this.calendarEventReplying,
|
required this.calendarEventReplying,
|
||||||
required this.isFreeBusyEnabled,
|
required this.isFreeBusyEnabled,
|
||||||
@@ -96,7 +99,11 @@ class CalendarEventInformationWidget extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
children: [
|
children: [
|
||||||
TextSpan(
|
TextSpan(
|
||||||
text: calendarEvent.organizerName,
|
text: calendarEvent.getUserNameEventAction(
|
||||||
|
context: context,
|
||||||
|
imagePaths: imagePaths,
|
||||||
|
listEmailAddressSender: listEmailAddressSender,
|
||||||
|
),
|
||||||
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
style: ThemeUtils.defaultTextStyleInterFont.copyWith(
|
||||||
color: CalendarEventInformationWidgetStyles
|
color: CalendarEventInformationWidgetStyles
|
||||||
.invitationMessageColor,
|
.invitationMessageColor,
|
||||||
|
|||||||
+6
@@ -1,3 +1,4 @@
|
|||||||
|
import 'package:core/presentation/resources/image_paths.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_test/flutter_test.dart';
|
import 'package:flutter_test/flutter_test.dart';
|
||||||
import 'package:jmap_dart_client/jmap/mail/calendar/calendar_event.dart';
|
import 'package:jmap_dart_client/jmap/mail/calendar/calendar_event.dart';
|
||||||
@@ -12,6 +13,8 @@ import '../../../../../fixtures/widget_fixtures.dart';
|
|||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
group('CalendarEventInformationWidget::', () {
|
group('CalendarEventInformationWidget::', () {
|
||||||
|
final imagePaths = ImagePaths();
|
||||||
|
|
||||||
testWidgets(
|
testWidgets(
|
||||||
'Should show warning message\n'
|
'Should show warning message\n'
|
||||||
'when user is not in the participants\n'
|
'when user is not in the participants\n'
|
||||||
@@ -36,6 +39,7 @@ void main() {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: CalendarEventInformationWidget(
|
body: CalendarEventInformationWidget(
|
||||||
calendarEvent: calendarEvent,
|
calendarEvent: calendarEvent,
|
||||||
|
imagePaths: imagePaths,
|
||||||
onCalendarEventReplyActionClick: (_) {},
|
onCalendarEventReplyActionClick: (_) {},
|
||||||
calendarEventReplying: false,
|
calendarEventReplying: false,
|
||||||
isFreeBusyEnabled: false,
|
isFreeBusyEnabled: false,
|
||||||
@@ -79,6 +83,7 @@ void main() {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: CalendarEventInformationWidget(
|
body: CalendarEventInformationWidget(
|
||||||
calendarEvent: calendarEvent,
|
calendarEvent: calendarEvent,
|
||||||
|
imagePaths: imagePaths,
|
||||||
onCalendarEventReplyActionClick: (_) {},
|
onCalendarEventReplyActionClick: (_) {},
|
||||||
calendarEventReplying: false,
|
calendarEventReplying: false,
|
||||||
isFreeBusyEnabled: false,
|
isFreeBusyEnabled: false,
|
||||||
@@ -119,6 +124,7 @@ void main() {
|
|||||||
child: Scaffold(
|
child: Scaffold(
|
||||||
body: CalendarEventInformationWidget(
|
body: CalendarEventInformationWidget(
|
||||||
calendarEvent: calendarEvent,
|
calendarEvent: calendarEvent,
|
||||||
|
imagePaths: imagePaths,
|
||||||
onCalendarEventReplyActionClick: (_) {},
|
onCalendarEventReplyActionClick: (_) {},
|
||||||
calendarEventReplying: false,
|
calendarEventReplying: false,
|
||||||
isFreeBusyEnabled: false,
|
isFreeBusyEnabled: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user