TF-4229 Add widget for label search field
This commit is contained in:
-9
@@ -1,9 +0,0 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/controller/mailbox_dashboard_controller.dart';
|
||||
|
||||
extension CheckLabelAvailableExtension on MailboxDashBoardController {
|
||||
bool get isLabelFeatureEnabled {
|
||||
return isLabelCapabilitySupported &&
|
||||
labelController.isLabelSettingEnabled.isTrue;
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
import 'package:get/get.dart';
|
||||
import 'package:tmail_ui_user/features/mailbox_dashboard/presentation/controller/mailbox_dashboard_controller.dart';
|
||||
|
||||
extension HandleLogicLabelExtension on MailboxDashBoardController {
|
||||
bool get isLabelCapabilitySupported {
|
||||
final accountId = this.accountId.value;
|
||||
final session = sessionCurrent;
|
||||
|
||||
if (accountId == null || session == null) return false;
|
||||
|
||||
return labelController.isLabelCapabilitySupported(session, accountId);
|
||||
}
|
||||
|
||||
bool get isLabelAvailable {
|
||||
return labelController.isLabelSettingEnabled.isTrue &&
|
||||
isLabelCapabilitySupported;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user