Skip to content

Commit

Permalink
TF-2475 Add onSubjectTextListener for subject focus node
Browse files Browse the repository at this point in the history
  • Loading branch information
dab246 committed Apr 16, 2024
1 parent a5f5f7d commit 157ad14
Showing 1 changed file with 8 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down Expand Up @@ -410,6 +410,7 @@ class VacationController extends BaseController {

@override
void onClose() {
subjectTextFocusNode.removeListener(_onSubjectTextListener);
subjectTextFocusNode.dispose();
subjectTextController.dispose();
richTextControllerForMobile.dispose();
Expand Down

0 comments on commit 157ad14

Please sign in to comment.