TF-2078 Fix ScrollController is currently attached to more than one ScrollPosition

(cherry picked from commit 96521061d8f0d4a6038180070cc9af6edc7dd70a)
This commit is contained in:
dab246
2023-08-10 19:32:56 +07:00
committed by Dat Vu
parent c938cc3d74
commit 5b87045b8a
2 changed files with 10 additions and 11 deletions
@@ -223,6 +223,7 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
log('SingleEmailController::_handleOpenEmailDetailedView(): email unselected');
return;
}
dispatchState(Right<Failure, Success>(GetEmailContentLoading()));
emailSupervisorController.updateNewCurrentListEmail();
_updateCurrentEmailId(selectedEmail.id);
@@ -364,7 +365,6 @@ class SingleEmailController extends BaseController with AppLoaderMixin {
final emailLoaded = emailSupervisorController.getEmailInQueueByEmailId(emailId);
if (emailLoaded != null) {
dispatchState(Right<Failure, Success>(GetEmailContentLoading()));
consumeState(Stream.value(Right<Failure, Success>(
GetEmailContentSuccess(
emailContent: emailLoaded.emailContent,
@@ -233,16 +233,15 @@ class EmailView extends GetWidget<SingleEmailController> with AppLoaderMixin {
return _buildEmailMessage(context, email);
} else {
return SingleChildScrollView(
primary: true,
physics : const ClampingScrollPhysics(),
child: Container(
margin: EdgeInsets.zero,
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.zero,
color: Colors.white,
child: _buildEmailMessage(context, email)
)
physics : const ClampingScrollPhysics(),
child: Container(
margin: EdgeInsets.zero,
width: double.infinity,
alignment: Alignment.center,
padding: EdgeInsets.zero,
color: Colors.white,
child: _buildEmailMessage(context, email)
)
);
}
}