mirror of
https://github.com/immich-app/immich.git
synced 2026-01-16 23:11:47 -08:00
* use adjustment time in iOS for hash reset # Conflicts: # mobile/lib/infrastructure/repositories/local_album.repository.dart # mobile/lib/presentation/pages/drift_asset_troubleshoot.page.dart * migration * feat: sync cloudId and eTag on sync * fixes fixes * more fixes * re-sync updated eTags * add server version check & auto sync cloud ids on compatible servers * fix test * remove button from sync status page * chore: modify for testing * more changes * chore: add commas in toString * use cached provider in splash screen * read upload service provider to prevent reset * log errors from fetching cloud id mapping * WIP: migrate cloud id - debug log * ignore locked asset update * bulk update metadata * change log text --------- Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com> Co-authored-by: Alex <alex.tran1502@gmail.com>
66 lines
2.3 KiB
Dart
66 lines
2.3 KiB
Dart
import 'dart:io';
|
|
|
|
const int noDbId = -9223372036854775808; // from Isar
|
|
const double downloadCompleted = -1;
|
|
const double downloadFailed = -2;
|
|
|
|
const String kMobileMetadataKey = "mobile-app";
|
|
|
|
// Number of log entries to retain on app start
|
|
const int kLogTruncateLimit = 2000;
|
|
|
|
// Sync
|
|
const int kSyncEventBatchSize = 5000;
|
|
const int kFetchLocalAssetsBatchSize = 40000;
|
|
|
|
// Hash batch limits
|
|
final int kBatchHashFileLimit = Platform.isIOS ? 32 : 512;
|
|
const int kBatchHashSizeLimit = 1024 * 1024 * 1024; // 1GB
|
|
|
|
// Secure storage keys
|
|
const String kSecuredPinCode = "secured_pin_code";
|
|
|
|
// background_downloader task groups
|
|
const String kManualUploadGroup = 'manual_upload_group';
|
|
const String kBackupGroup = 'backup_group';
|
|
const String kBackupLivePhotoGroup = 'backup_live_photo_group';
|
|
const String kDownloadGroupImage = 'group_image';
|
|
const String kDownloadGroupVideo = 'group_video';
|
|
const String kDownloadGroupLivePhoto = 'group_livephoto';
|
|
|
|
// Timeline constants
|
|
const int kTimelineNoneSegmentSize = 120;
|
|
const int kTimelineAssetLoadBatchSize = 1024;
|
|
const int kTimelineAssetLoadOppositeSize = 64;
|
|
|
|
// Widget keys
|
|
const String appShareGroupId = "group.app.immich.share";
|
|
const String kWidgetAuthToken = "widget_auth_token";
|
|
const String kWidgetServerEndpoint = "widget_server_url";
|
|
const String kWidgetCustomHeaders = "widget_custom_headers";
|
|
|
|
// add widget identifiers here for new widgets
|
|
// these are used to force a widget refresh
|
|
// (iOSName, androidFQDN)
|
|
const List<(String, String)> kWidgetNames = [
|
|
('com.immich.widget.random', 'app.alextran.immich.widget.RandomReceiver'),
|
|
('com.immich.widget.memory', 'app.alextran.immich.widget.MemoryReceiver'),
|
|
];
|
|
|
|
const double kUploadStatusFailed = -1.0;
|
|
const double kUploadStatusCanceled = -2.0;
|
|
|
|
const int kMinMonthsToEnableScrubberSnap = 12;
|
|
|
|
const String kImmichAppStoreLink = "https://apps.apple.com/app/immich/id1613945652";
|
|
const String kImmichPlayStoreLink = "https://play.google.com/store/apps/details?id=app.alextran.immich";
|
|
const String kImmichLatestRelease = "https://github.com/immich-app/immich/releases/latest";
|
|
|
|
const int kPhotoTabIndex = 0;
|
|
const int kSearchTabIndex = 1;
|
|
const int kAlbumTabIndex = 2;
|
|
const int kLibraryTabIndex = 3;
|
|
|
|
// Workaround for SQLite's variable limit (SQLITE_MAX_VARIABLE_NUMBER = 32766)
|
|
const int kDriftMaxChunk = 32000;
|