feat: Fix loop uses sinceState instead of newSinceState, causing infinite loops.
This commit is contained in:
@@ -36,8 +36,10 @@ extension HandleLabelWebsocketExtension on LabelController {
|
||||
|
||||
if (refreshState is GetLabelChangesSuccess) {
|
||||
await _handleGetLabelChangesSuccess(refreshState);
|
||||
} else {
|
||||
} else if (refreshState != null) {
|
||||
onDataFailureViewState(refreshState);
|
||||
} else {
|
||||
logWarning('HandleLabelWebsocketExtension::handleWebSocketMessage: refreshState is null');
|
||||
}
|
||||
} catch (e, stackTrace) {
|
||||
logWarning(
|
||||
|
||||
@@ -244,6 +244,10 @@ class LabelUtils {
|
||||
}
|
||||
}
|
||||
|
||||
/// Applies label changes to [currentLabels] **in place**.
|
||||
///
|
||||
/// Removes labels matching [destroyedIds], [created], and [updated] IDs,
|
||||
/// then appends [created] and [updated] labels.
|
||||
static void applyLabelChanges({
|
||||
required List<Label> currentLabels,
|
||||
required List<Label> created,
|
||||
|
||||
Reference in New Issue
Block a user