mirror of
https://github.com/immich-app/immich.git
synced 2026-04-06 09:12:03 -04:00
chore: typesafe websocket event parsing
This commit is contained in:
parent
b6605b4b47
commit
b3849c0251
@ -22,6 +22,7 @@ import 'package:immich_mobile/services/foreground_upload.service.dart';
|
||||
import 'package:immich_mobile/services/timeline.service.dart';
|
||||
import 'package:immich_mobile/widgets/asset_grid/delete_dialog.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:openapi/api.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
final actionProvider = NotifierProvider<ActionNotifier, void>(
|
||||
@ -502,8 +503,8 @@ class ActionNotifier extends Notifier<void> {
|
||||
}
|
||||
|
||||
final completer = ref.read(websocketProvider.notifier).waitForEvent("AssetEditReadyV1", (dynamic data) {
|
||||
final eventData = data as Map<String, dynamic>;
|
||||
return eventData["asset"]['id'] == ids.first;
|
||||
final eventAsset = SyncAssetV1.fromJson(data["asset"]);
|
||||
return eventAsset?.id == ids.first;
|
||||
}, const Duration(seconds: 10));
|
||||
|
||||
try {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user