TF-56 Create object LoadingState
This commit is contained in:
@@ -14,7 +14,7 @@ class GetAllMailboxInteractor {
|
||||
|
||||
Stream<Either<Failure, Success>> execute(AccountId accountId, {Properties? properties}) async* {
|
||||
try {
|
||||
yield Right<Failure, Success>(UIState.loading);
|
||||
yield Right<Failure, Success>(LoadingState());
|
||||
final mailboxList = await mailboxRepository.getAllMailbox(accountId, properties: properties);
|
||||
final tupleList = mailboxList.splitMailboxList((mailbox) => mailbox.hasRole());
|
||||
yield Right<Failure, Success>(GetAllMailboxSuccess(defaultMailboxList: tupleList.value1, folderMailboxList: tupleList.value2));
|
||||
|
||||
@@ -110,7 +110,7 @@ class MailboxView extends GetWidget<MailboxController> {
|
||||
Widget _buildLoadingView() {
|
||||
return Obx(() => controller.viewState.value.fold(
|
||||
(failure) => SizedBox.shrink(),
|
||||
(success) => success == UIState.loading
|
||||
(success) => success is LoadingState
|
||||
? Center(child: Padding(
|
||||
padding: EdgeInsets.only(top: 16),
|
||||
child: SizedBox(
|
||||
|
||||
Reference in New Issue
Block a user