Skip to content

Commit

Permalink
Merge branch 'fix/#11-missing-decoding-key' into 'main':
Browse files Browse the repository at this point in the history
commit df0e753f32f07b87066dd5efcfdf5c41d09953a6
Author: Lukas Pistrol <lukas@pistrol.com>
Date:   Wed Nov 15 00:41:10 2023 +0100

    make 'ExcludedVolumeUUIDs' optional
  • Loading branch information
lukepistrol committed Nov 14, 2023
1 parent 196630d commit 6deb4a7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
16 changes: 8 additions & 8 deletions TimeMachineStatus.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@
CODE_SIGN_ENTITLEMENTS = TimeMachineStatusHelper/TimeMachineStatusHelper.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -538,7 +538,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 0.0.2;
MARKETING_VERSION = 0.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.lukaspistrol.TimeMachineStatusHelper;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand All @@ -554,7 +554,7 @@
CODE_SIGN_ENTITLEMENTS = TimeMachineStatusHelper/TimeMachineStatusHelper.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
GENERATE_INFOPLIST_FILE = YES;
Expand All @@ -567,7 +567,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 0.0.2;
MARKETING_VERSION = 0.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.lukaspistrol.TimeMachineStatusHelper;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
Expand Down Expand Up @@ -702,7 +702,7 @@
CODE_SIGN_ENTITLEMENTS = TimeMachineStatus/TimeMachineStatus.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"TimeMachineStatus/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
Expand All @@ -719,7 +719,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 0.0.2;
MARKETING_VERSION = 0.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.lukaspistrol.TimeMachineStatus;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand All @@ -736,7 +736,7 @@
CODE_SIGN_ENTITLEMENTS = TimeMachineStatus/TimeMachineStatus.entitlements;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 2;
CURRENT_PROJECT_VERSION = 3;
DEVELOPMENT_ASSET_PATHS = "\"TimeMachineStatus/Preview Content\"";
DEVELOPMENT_TEAM = "";
ENABLE_HARDENED_RUNTIME = NO;
Expand All @@ -753,7 +753,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
MARKETING_VERSION = 0.0.2;
MARKETING_VERSION = 0.0.3;
PRODUCT_BUNDLE_IDENTIFIER = com.lukaspistrol.TimeMachineStatus;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_EMIT_LOC_STRINGS = YES;
Expand Down
8 changes: 4 additions & 4 deletions TimeMachineStatus/Model/Preferences/Preferences.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,22 +27,22 @@ struct Preferences: Decodable {

let autoBackup: Bool
let autoBackupInterval: Int?
let excludedVolumeUUIDs: [UUID]
let excludedVolumeUUIDs: [UUID]?
let preferencesVersion: Int
let requiresACPower: Bool
let lastConfigurationTraceDate: Date
let lastDestinationID: UUID?
let localizedDiskImageVolumeName: String
let skipPaths: [String]?
let destinations: [Destination]
let destinations: [Destination]?

var latestBackupDate: Date? {
destinations.map(\.snapshotDates).flatMap { $0 }.max()
destinations?.map(\.snapshotDates).flatMap { $0 }.max()
}

var latestBackupVolume: String? {
guard let lastDestinationID else { return nil }
return destinations
return destinations?
.first { $0.destinationID == lastDestinationID }?
.lastKnownVolumeName
}
Expand Down

0 comments on commit 6deb4a7

Please sign in to comment.