TF-4141 Add the AI needs-action option into the user settings.
This commit is contained in:
@@ -510,8 +510,7 @@ class ThreadView extends GetWidget<ThreadController>
|
||||
final isSearchEmailRunning =
|
||||
controller.searchController.isSearchEmailRunning;
|
||||
|
||||
final isAiCapabilitySupported =
|
||||
dashboardController.isAiCapabilitySupported;
|
||||
final isAINeedsActionEnabled = dashboardController.isAINeedsActionEnabled;
|
||||
|
||||
return EmailTileBuilder(
|
||||
key: Key('email_tile_builder_${presentationEmail.id?.asString}'),
|
||||
@@ -523,7 +522,7 @@ class ThreadView extends GetWidget<ThreadController>
|
||||
isSearchEmailRunning: isSearchEmailRunning,
|
||||
isDrag: true,
|
||||
isSenderImportantFlagEnabled: isSenderImportantFlagEnabled,
|
||||
isAIEnabled: isAiCapabilitySupported,
|
||||
isAINeedsActionEnabled: isAINeedsActionEnabled,
|
||||
);
|
||||
});
|
||||
}
|
||||
@@ -607,8 +606,7 @@ class ThreadView extends GetWidget<ThreadController>
|
||||
final isSearchEmailRunning =
|
||||
controller.searchController.isSearchEmailRunning;
|
||||
|
||||
final isAiCapabilitySupported =
|
||||
dashboardController.isAiCapabilitySupported;
|
||||
final isAINeedsActionEnabled = dashboardController.isAINeedsActionEnabled;
|
||||
|
||||
return Dismissible(
|
||||
key: ValueKey<EmailId?>(presentationEmail.id),
|
||||
@@ -632,7 +630,7 @@ class ThreadView extends GetWidget<ThreadController>
|
||||
searchQuery: controller.searchQuery,
|
||||
mailboxContain: presentationEmail.mailboxContain,
|
||||
isSearchEmailRunning: isSearchEmailRunning,
|
||||
isAIEnabled: isAiCapabilitySupported,
|
||||
isAINeedsActionEnabled: isAINeedsActionEnabled,
|
||||
emailActionClick: _handleEmailActionClicked,
|
||||
onMoreActionClick: (email, position) =>
|
||||
_handleEmailContextMenuAction(context, email, position),
|
||||
|
||||
@@ -20,7 +20,7 @@ class EmailTileBuilder extends StatelessWidget with BaseEmailItemTile {
|
||||
final bool isDrag;
|
||||
final bool isShowingEmailContent;
|
||||
final bool isSenderImportantFlagEnabled;
|
||||
final bool isAIEnabled;
|
||||
final bool isAINeedsActionEnabled;
|
||||
final OnPressEmailActionClick? emailActionClick;
|
||||
final OnMoreActionClick? onMoreActionClick;
|
||||
|
||||
@@ -32,7 +32,7 @@ class EmailTileBuilder extends StatelessWidget with BaseEmailItemTile {
|
||||
this.searchQuery,
|
||||
this.isSearchEmailRunning = false,
|
||||
this.isSenderImportantFlagEnabled = true,
|
||||
this.isAIEnabled = true,
|
||||
this.isAINeedsActionEnabled = true,
|
||||
this.mailboxContain,
|
||||
this.padding,
|
||||
this.isDrag = false,
|
||||
@@ -141,5 +141,5 @@ class EmailTileBuilder extends StatelessWidget with BaseEmailItemTile {
|
||||
}
|
||||
|
||||
bool get _shouldShowAIAction =>
|
||||
isAIEnabled && presentationEmail.hasNeedAction;
|
||||
isAINeedsActionEnabled && presentationEmail.hasNeedAction;
|
||||
}
|
||||
@@ -27,7 +27,7 @@ class EmailTileBuilder extends StatefulWidget {
|
||||
final bool isDrag;
|
||||
final bool isShowingEmailContent;
|
||||
final bool isSenderImportantFlagEnabled;
|
||||
final bool isAIEnabled;
|
||||
final bool isAINeedsActionEnabled;
|
||||
final OnPressEmailActionClick? emailActionClick;
|
||||
final OnMoreActionClick? onMoreActionClick;
|
||||
|
||||
@@ -42,7 +42,7 @@ class EmailTileBuilder extends StatefulWidget {
|
||||
this.mailboxContain,
|
||||
this.padding,
|
||||
this.isDrag = false,
|
||||
this.isAIEnabled = false,
|
||||
this.isAINeedsActionEnabled = false,
|
||||
this.emailActionClick,
|
||||
this.onMoreActionClick,
|
||||
});
|
||||
@@ -423,7 +423,7 @@ class _EmailTileBuilderState extends State<EmailTileBuilder> with BaseEmailItem
|
||||
}
|
||||
|
||||
bool get _shouldShowAIAction =>
|
||||
widget.isAIEnabled && widget.presentationEmail.hasNeedAction;
|
||||
widget.isAINeedsActionEnabled && widget.presentationEmail.hasNeedAction;
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
|
||||
Reference in New Issue
Block a user