feat: Fix loop uses sinceState instead of newSinceState, causing infinite loops.
This commit is contained in:
@@ -19,6 +19,8 @@ import 'package:uuid/uuid.dart';
|
||||
class LabelApi
|
||||
with HandleSetErrorMixin, SessionMixin, BatchGetLabelProcessingMixin {
|
||||
|
||||
static const int _defaultMaxChanges = 128;
|
||||
|
||||
final HttpClient _httpClient;
|
||||
final Uuid _uuid;
|
||||
|
||||
@@ -179,7 +181,7 @@ class LabelApi
|
||||
final changesLabelMethod = ChangesLabelMethod(
|
||||
accountId,
|
||||
sinceState,
|
||||
maxChanges: UnsignedInt(128),
|
||||
maxChanges: UnsignedInt(_defaultMaxChanges),
|
||||
);
|
||||
final changesLabelInvocation =
|
||||
jmapRequestBuilder.invocation(changesLabelMethod);
|
||||
|
||||
@@ -50,7 +50,7 @@ class LabelRepositoryImpl extends LabelRepository {
|
||||
final changesResponse = await _labelDatasource.getLabelChanges(
|
||||
session,
|
||||
accountId,
|
||||
sinceState,
|
||||
newSinceState,
|
||||
);
|
||||
|
||||
hasMoreChanges = changesResponse.hasMoreChanges;
|
||||
|
||||
Reference in New Issue
Block a user