mirror of
				https://github.com/KevinMidboe/immich.git
				synced 2025-10-29 17:40:28 +00:00 
			
		
		
		
	fix(mobile): Start up from splash screen does not trigger foreground backup (#1042)
This commit is contained in:
		@@ -5,17 +5,17 @@
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
      
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="0: default_platform" time="0.000345">
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="0: default_platform" time="0.000201">
 | 
			
		||||
        
 | 
			
		||||
      </testcase>
 | 
			
		||||
    
 | 
			
		||||
      
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="1: bundleRelease" time="123.14891">
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="1: bundleRelease" time="63.132489">
 | 
			
		||||
        
 | 
			
		||||
      </testcase>
 | 
			
		||||
    
 | 
			
		||||
      
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="2: upload_to_play_store" time="39.270764">
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="2: upload_to_play_store" time="38.15883">
 | 
			
		||||
        
 | 
			
		||||
      </testcase>
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
@@ -360,7 +360,7 @@
 | 
			
		||||
				CODE_SIGN_ENTITLEMENTS = Runner/RunnerProfile.entitlements;
 | 
			
		||||
				CODE_SIGN_IDENTITY = "Apple Development";
 | 
			
		||||
				CODE_SIGN_STYLE = Automatic;
 | 
			
		||||
				CURRENT_PROJECT_VERSION = 72;
 | 
			
		||||
				CURRENT_PROJECT_VERSION = 73;
 | 
			
		||||
				DEVELOPMENT_TEAM = 2F67MQ8R79;
 | 
			
		||||
				ENABLE_BITCODE = NO;
 | 
			
		||||
				INFOPLIST_FILE = Runner/Info.plist;
 | 
			
		||||
@@ -495,7 +495,7 @@
 | 
			
		||||
				CLANG_ENABLE_MODULES = YES;
 | 
			
		||||
				CODE_SIGN_IDENTITY = "Apple Development";
 | 
			
		||||
				CODE_SIGN_STYLE = Automatic;
 | 
			
		||||
				CURRENT_PROJECT_VERSION = 72;
 | 
			
		||||
				CURRENT_PROJECT_VERSION = 73;
 | 
			
		||||
				DEVELOPMENT_TEAM = 2F67MQ8R79;
 | 
			
		||||
				ENABLE_BITCODE = NO;
 | 
			
		||||
				INFOPLIST_FILE = Runner/Info.plist;
 | 
			
		||||
@@ -522,7 +522,7 @@
 | 
			
		||||
				CLANG_ENABLE_MODULES = YES;
 | 
			
		||||
				CODE_SIGN_IDENTITY = "Apple Development";
 | 
			
		||||
				CODE_SIGN_STYLE = Automatic;
 | 
			
		||||
				CURRENT_PROJECT_VERSION = 72;
 | 
			
		||||
				CURRENT_PROJECT_VERSION = 73;
 | 
			
		||||
				DEVELOPMENT_TEAM = 2F67MQ8R79;
 | 
			
		||||
				ENABLE_BITCODE = NO;
 | 
			
		||||
				INFOPLIST_FILE = Runner/Info.plist;
 | 
			
		||||
 
 | 
			
		||||
@@ -17,11 +17,11 @@
 | 
			
		||||
    <key>CFBundlePackageType</key>
 | 
			
		||||
    <string>APPL</string>
 | 
			
		||||
    <key>CFBundleShortVersionString</key>
 | 
			
		||||
    <string>1.36.1</string>
 | 
			
		||||
    <string>1.37.0</string>
 | 
			
		||||
    <key>CFBundleSignature</key>
 | 
			
		||||
    <string>????</string>
 | 
			
		||||
    <key>CFBundleVersion</key>
 | 
			
		||||
    <string>72</string>
 | 
			
		||||
    <string>73</string>
 | 
			
		||||
    <key>LSRequiresIPhoneOS</key>
 | 
			
		||||
    <true />
 | 
			
		||||
    <key>MGLMapboxMetricsEnabledSettingShownInApp</key>
 | 
			
		||||
 
 | 
			
		||||
@@ -5,32 +5,32 @@
 | 
			
		||||
    
 | 
			
		||||
    
 | 
			
		||||
      
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="0: default_platform" time="0.000358">
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="0: default_platform" time="0.000198">
 | 
			
		||||
        
 | 
			
		||||
      </testcase>
 | 
			
		||||
    
 | 
			
		||||
      
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="1: increment_version_number" time="0.721922">
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="1: increment_version_number" time="1.628003">
 | 
			
		||||
        
 | 
			
		||||
      </testcase>
 | 
			
		||||
    
 | 
			
		||||
      
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="2: latest_testflight_build_number" time="6.015111">
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="2: latest_testflight_build_number" time="8.590581">
 | 
			
		||||
        
 | 
			
		||||
      </testcase>
 | 
			
		||||
    
 | 
			
		||||
      
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="3: increment_build_number" time="0.656945">
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="3: increment_build_number" time="0.617507">
 | 
			
		||||
        
 | 
			
		||||
      </testcase>
 | 
			
		||||
    
 | 
			
		||||
      
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="4: build_app" time="75.686541">
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="4: build_app" time="81.79009">
 | 
			
		||||
        
 | 
			
		||||
      </testcase>
 | 
			
		||||
    
 | 
			
		||||
      
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="5: upload_to_testflight" time="68.644406">
 | 
			
		||||
      <testcase classname="fastlane.lanes" name="5: upload_to_testflight" time="74.632018">
 | 
			
		||||
        
 | 
			
		||||
      </testcase>
 | 
			
		||||
    
 | 
			
		||||
 
 | 
			
		||||
@@ -69,7 +69,6 @@ class BackupNotifier extends StateNotifier<BackUpState> {
 | 
			
		||||
  final AuthenticationState _authState;
 | 
			
		||||
  final BackgroundService _backgroundService;
 | 
			
		||||
  final Ref ref;
 | 
			
		||||
  var isGettingBackupInfo = false;
 | 
			
		||||
 | 
			
		||||
  ///
 | 
			
		||||
  /// UI INTERACTION
 | 
			
		||||
@@ -375,9 +374,6 @@ class BackupNotifier extends StateNotifier<BackUpState> {
 | 
			
		||||
  /// which albums are selected or excluded
 | 
			
		||||
  /// and then update the UI according to those information
 | 
			
		||||
  Future<void> getBackupInfo() async {
 | 
			
		||||
    if (!isGettingBackupInfo) {
 | 
			
		||||
      isGettingBackupInfo = true;
 | 
			
		||||
 | 
			
		||||
    var isEnabled = await _backgroundService.isBackgroundBackupEnabled();
 | 
			
		||||
 | 
			
		||||
    state = state.copyWith(backgroundBackup: isEnabled);
 | 
			
		||||
@@ -387,9 +383,6 @@ class BackupNotifier extends StateNotifier<BackUpState> {
 | 
			
		||||
      await _updateServerInfo();
 | 
			
		||||
      await _updateBackupAssetCount();
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
      isGettingBackupInfo = false;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /// Save user selection of selected albums and excluded albums to
 | 
			
		||||
@@ -415,6 +408,7 @@ class BackupNotifier extends StateNotifier<BackUpState> {
 | 
			
		||||
 | 
			
		||||
  /// Invoke backup process
 | 
			
		||||
  Future<void> startBackupProcess() async {
 | 
			
		||||
    debugPrint("Start backup process");
 | 
			
		||||
    assert(state.backupProgress == BackUpProgressEnum.idle);
 | 
			
		||||
    state = state.copyWith(backupProgress: BackUpProgressEnum.inProgress);
 | 
			
		||||
 | 
			
		||||
@@ -431,7 +425,6 @@ class BackupNotifier extends StateNotifier<BackUpState> {
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
      Set<AssetEntity> assetsWillBeBackup = Set.from(state.allUniqueAssets);
 | 
			
		||||
 | 
			
		||||
      // Remove item that has already been backed up
 | 
			
		||||
      for (var assetId in state.allAssetsInDatabase) {
 | 
			
		||||
        assetsWillBeBackup.removeWhere((e) => e.id == assetId);
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user