mirror of
https://github.com/immich-app/immich.git
synced 2025-07-07 10:14:08 -04:00
* reduce timeline rebuilds * feat: adds bottom sheet map and actions (#19692) * adds bottom sheet map and actions * PR feedbacks * only reload the asset viewer if asset is changed * styling tweak --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com> * rename singleton and remove event prefix * adds bottom sheet map and actions * PR feedbacks * refactor: use provider for viewer state * feat: adds top and bottom app bar * add safe area to bottom app bar * change app and bottom bar color * viewer - always have black background * use the full width for the bottom sheet on landscape as well * constraint the bottom sheet to not expand all the way * add padding for location details in landscape --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
36 lines
1.2 KiB
Dart
36 lines
1.2 KiB
Dart
import 'package:drift/drift.dart';
|
|
import 'package:immich_mobile/domain/models/asset/base_asset.model.dart';
|
|
import 'package:immich_mobile/infrastructure/entities/local_asset.entity.drift.dart';
|
|
import 'package:immich_mobile/infrastructure/utils/asset.mixin.dart';
|
|
import 'package:immich_mobile/infrastructure/utils/drift_default.mixin.dart';
|
|
|
|
@TableIndex(name: 'idx_local_asset_checksum', columns: {#checksum})
|
|
class LocalAssetEntity extends Table with DriftDefaultsMixin, AssetEntityMixin {
|
|
const LocalAssetEntity();
|
|
|
|
TextColumn get id => text()();
|
|
TextColumn get checksum => text().nullable()();
|
|
|
|
// Only used during backup to mirror the favorite status of the asset in the server
|
|
BoolColumn get isFavorite => boolean().withDefault(const Constant(false))();
|
|
|
|
@override
|
|
Set<Column> get primaryKey => {id};
|
|
}
|
|
|
|
extension LocalAssetEntityDataDomainEx on LocalAssetEntityData {
|
|
LocalAsset toDto() => LocalAsset(
|
|
id: id,
|
|
name: name,
|
|
checksum: checksum,
|
|
type: type,
|
|
createdAt: createdAt,
|
|
updatedAt: updatedAt,
|
|
durationInSeconds: durationInSeconds,
|
|
isFavorite: isFavorite,
|
|
height: height,
|
|
width: width,
|
|
remoteId: null,
|
|
);
|
|
}
|