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