TF-3385 Remove skipCache mechanism in get all emails
This commit is contained in:
@@ -49,7 +49,6 @@ class ThreadRepositoryImpl extends ThreadRepository {
|
||||
Properties? propertiesCreated,
|
||||
Properties? propertiesUpdated,
|
||||
bool getLatestChanges = true,
|
||||
bool skipCache = false,
|
||||
}
|
||||
) async* {
|
||||
log('ThreadRepositoryImpl::getAllEmail(): filter = ${emailFilter?.mailboxId}');
|
||||
@@ -89,7 +88,7 @@ class ThreadRepositoryImpl extends ThreadRepository {
|
||||
);
|
||||
}
|
||||
yield networkEmailResponse;
|
||||
} else if (!skipCache) {
|
||||
} else {
|
||||
yield localEmailResponse;
|
||||
}
|
||||
|
||||
|
||||
@@ -29,7 +29,6 @@ abstract class ThreadRepository {
|
||||
Properties? propertiesCreated,
|
||||
Properties? propertiesUpdated,
|
||||
bool getLatestChanges = true,
|
||||
bool skipCache = false,
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
@@ -27,7 +27,6 @@ class GetEmailsInMailboxInteractor {
|
||||
Properties? propertiesCreated,
|
||||
Properties? propertiesUpdated,
|
||||
bool getLatestChanges = true,
|
||||
bool skipCache = false,
|
||||
}
|
||||
) async* {
|
||||
try {
|
||||
@@ -42,8 +41,7 @@ class GetEmailsInMailboxInteractor {
|
||||
emailFilter: emailFilter,
|
||||
propertiesCreated: propertiesCreated,
|
||||
propertiesUpdated: propertiesUpdated,
|
||||
getLatestChanges: getLatestChanges,
|
||||
skipCache: skipCache)
|
||||
getLatestChanges: getLatestChanges)
|
||||
.map((emailResponse) => _toGetEmailState(
|
||||
emailResponse: emailResponse,
|
||||
currentMailboxId: emailFilter?.mailboxId
|
||||
|
||||
@@ -489,7 +489,6 @@ class ThreadController extends BaseController with EmailActionController {
|
||||
|
||||
void _getAllEmailAction({
|
||||
bool getLatestChanges = true,
|
||||
bool skipCache = false,
|
||||
}) {
|
||||
log('ThreadController::_getAllEmailAction:');
|
||||
if (_session != null &&_accountId != null) {
|
||||
@@ -506,7 +505,6 @@ class ThreadController extends BaseController with EmailActionController {
|
||||
propertiesCreated: EmailUtils.getPropertiesForEmailGetMethod(_session!, _accountId!),
|
||||
propertiesUpdated: ThreadConstants.propertiesUpdatedDefault,
|
||||
getLatestChanges: getLatestChanges,
|
||||
skipCache: skipCache,
|
||||
));
|
||||
} else {
|
||||
consumeState(Stream.value(Left(GetAllEmailFailure(NotFoundSessionException()))));
|
||||
@@ -555,7 +553,7 @@ class ThreadController extends BaseController with EmailActionController {
|
||||
if (searchController.isSearchEmailRunning) {
|
||||
_searchEmail(limit: limitEmailFetched);
|
||||
} else {
|
||||
_getAllEmailAction(skipCache: true);
|
||||
_getAllEmailAction();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user