mirror of
https://github.com/immich-app/immich.git
synced 2026-04-16 23:51:55 -04:00
* refactor: yank old timeline # Conflicts: # mobile/lib/presentation/pages/editing/drift_edit.page.dart # mobile/lib/providers/websocket.provider.dart # mobile/lib/routing/router.dart * more cleanup * remove native code * chore: bump sqlite-data version * remove old background tasks from BGTaskSchedulerPermittedIdentifiers * rebase --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
17 lines
482 B
Dart
17 lines
482 B
Dart
import 'dart:convert';
|
|
import 'dart:typed_data';
|
|
|
|
import 'package:flutter_hooks/flutter_hooks.dart';
|
|
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
|
import 'package:thumbhash/thumbhash.dart' as thumbhash;
|
|
|
|
ObjectRef<Uint8List?> useDriftBlurHashRef(RemoteAsset? asset) {
|
|
if (asset?.thumbHash == null) {
|
|
return useRef(null);
|
|
}
|
|
|
|
final rbga = thumbhash.thumbHashToRGBA(base64Decode(asset!.thumbHash!));
|
|
|
|
return useRef(thumbhash.rgbaToBmp(rbga));
|
|
}
|