You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-06 06:07:29 +02:00
refactor(mobile): add AssetState and proper asset updating (#2270)
* refactor(mobile): add AssetState and proper asset updating * generate files --------- Co-authored-by: Fynn Petersen-Frey <zoodyy@users.noreply.github.com> Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
committed by
GitHub
parent
b970a40b4e
commit
e80d37bf8f
14
mobile/lib/utils/storage_indicator.dart
Normal file
14
mobile/lib/utils/storage_indicator.dart
Normal file
@ -0,0 +1,14 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:immich_mobile/shared/models/asset.dart';
|
||||
|
||||
/// Returns the suitable [IconData] to represent an [Asset]s storage location
|
||||
IconData storageIcon(Asset asset) {
|
||||
switch (asset.storage) {
|
||||
case AssetState.local:
|
||||
return Icons.cloud_off_outlined;
|
||||
case AssetState.remote:
|
||||
return Icons.cloud_outlined;
|
||||
case AssetState.merged:
|
||||
return Icons.cloud_done_outlined;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user