TF-2475 Add onSubjectTextListener for subject focus node
This commit is contained in:
@@ -236,7 +236,9 @@ class SettingsView extends GetWidget<SettingsController> {
|
||||
}
|
||||
case AccountMenuItem.alwaysReadReceipt:
|
||||
if (controller.manageAccountDashboardController.isServerSettingsCapabilitySupported) {
|
||||
return const AlwaysReadReceiptView();
|
||||
return const SafeArea(
|
||||
top: false,
|
||||
child: AlwaysReadReceiptView());
|
||||
} else {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
@@ -259,7 +261,9 @@ class SettingsView extends GetWidget<SettingsController> {
|
||||
top: false,
|
||||
child: MailboxVisibilityView());
|
||||
case AccountMenuItem.notification:
|
||||
return const NotificationView();
|
||||
return const SafeArea(
|
||||
top: false,
|
||||
child: NotificationView());
|
||||
default:
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
|
||||
@@ -95,13 +95,13 @@ class VacationController extends BaseController {
|
||||
}
|
||||
|
||||
void _initFocusListener() {
|
||||
subjectTextFocusNode.addListener(() {
|
||||
if (subjectTextFocusNode.hasFocus == true) {
|
||||
if (PlatformInfo.isMobile) {
|
||||
richTextControllerForMobile.hideRichTextView();
|
||||
}
|
||||
}
|
||||
});
|
||||
subjectTextFocusNode.addListener(_onSubjectTextListener);
|
||||
}
|
||||
|
||||
void _onSubjectTextListener() {
|
||||
if (subjectTextFocusNode.hasFocus && PlatformInfo.isMobile) {
|
||||
richTextControllerForMobile.hideRichTextView();
|
||||
}
|
||||
}
|
||||
|
||||
void _getAllVacation() {
|
||||
@@ -410,6 +410,7 @@ class VacationController extends BaseController {
|
||||
|
||||
@override
|
||||
void onClose() {
|
||||
subjectTextFocusNode.removeListener(_onSubjectTextListener);
|
||||
subjectTextFocusNode.dispose();
|
||||
subjectTextController.dispose();
|
||||
richTextControllerForMobile.dispose();
|
||||
|
||||
Reference in New Issue
Block a user