TF-2182 Add event actions for google event
(cherry picked from commit 3ca22fdda072ad1fe29378b3d733cef74aa1ab5f)
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/id.dart';
|
||||
import 'package:jmap_dart_client/jmap/mail/calendar/calendar_event.dart';
|
||||
@@ -23,14 +22,7 @@ class LocalCalendarEventDataSourceImpl extends CalendarEventDataSource {
|
||||
@override
|
||||
Future<List<EventAction>> getListEventAction(String emailContents) {
|
||||
return Future.sync(() async {
|
||||
final listLink = await _htmlAnalyzer.getListLinkCalendarEvent(emailContents);
|
||||
if (listLink.length >= EventActionType.values.length) {
|
||||
return EventActionType.values
|
||||
.mapIndexed((index, type) => EventAction(type, listLink[index]))
|
||||
.toList();
|
||||
} else {
|
||||
return <EventAction>[];
|
||||
}
|
||||
return await _htmlAnalyzer.getListEventAction(emailContents);
|
||||
}).catchError(_exceptionThrower.throwException);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user