fix(cnb): Cannot clear email state cache when reload page
(cherry picked from commit a901206a7879d2f670d29be52ab4a297f1eb6c72)
This commit is contained in:
@@ -3,6 +3,7 @@ import 'dart:ui';
|
||||
|
||||
import 'package:core/presentation/extensions/uri_extension.dart';
|
||||
import 'package:core/utils/app_logger.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:get/get_utils/src/extensions/string_extensions.dart';
|
||||
import 'package:jmap_dart_client/jmap/account_id.dart';
|
||||
import 'package:jmap_dart_client/jmap/core/capability/calendar_event_capability.dart';
|
||||
@@ -172,6 +173,15 @@ extension SessionExtension on Session {
|
||||
|
||||
AccountId get accountId => personalAccount.accountId;
|
||||
|
||||
AccountId? get safeAccountId {
|
||||
try {
|
||||
return personalAccount.accountId;
|
||||
} catch (e) {
|
||||
logError('SessionExtension::safeAccountId:Exception: $e');
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
({
|
||||
bool isAvailable,
|
||||
CalendarEventCapability? calendarEventCapability
|
||||
|
||||
Reference in New Issue
Block a user