Skip to content

Commit 4348361

Browse files
Fully fixed Fastlane screenshots to use correct localization
Removed Pro limit for distribution on TestFlight Changed popovers to sheets to correctly display on iPad Made sidebar in lists view initially visible on iPad Removed duplicate fastlane files form root directory
1 parent 6767647 commit 4348361

File tree

14 files changed

+46
-378
lines changed

14 files changed

+46
-378
lines changed

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ GEM
88
artifactory (3.0.15)
99
atomos (0.1.3)
1010
aws-eventstream (1.2.0)
11-
aws-partitions (1.693.0)
11+
aws-partitions (1.694.0)
1212
aws-sdk-core (3.168.4)
1313
aws-eventstream (~> 1, >= 1.0.2)
1414
aws-partitions (~> 1, >= 1.651.0)
@@ -215,4 +215,4 @@ DEPENDENCIES
215215
fastlane
216216

217217
BUNDLED WITH
218-
2.3.26
218+
2.4.2

Movie DB/AppDelegate.swift

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,13 @@ class AppDelegate: NSObject, UIApplicationDelegate {
2828
// Prepare with sample data for taking screenshots
2929
PersistenceController.prepareForUITesting()
3030
JFConfig.shared.region = Locale.current.region?.identifier ?? ""
31-
// !!!: If the device is set to "English" (not "English (United States)"), the device region is used
32-
// !!!: e.g. setting the device language to "English" and the region to "Germany", yields "en_DE",
33-
// !!!: which is not a valid language identifier for the API.
34-
// !!!: So we need to make sure to only use full language identifiers (e.g. setting the device language
35-
// !!!: to "English (United States)" instead of "English".
31+
// Combining language and region can lead to invalid language/region pairs (e.g. if the device language
32+
// is "English" and the device region is "Germany", the pair will be "en-DE", on the other hand, if the
33+
// device language is "English (Australia)" and the region is "Germany", the pair will correctly be
34+
// "en-AU".
3635
let lang = Locale.current.language.languageCode!.identifier
3736
let region = Locale.current.language.region!.identifier
38-
JFConfig.shared.language = "\(lang)_\(region)"
37+
JFConfig.shared.language = "\(lang)-\(region)"
3938

4039
let bgContext = PersistenceController.viewContext.newBackgroundContext()
4140
// Add sample data

Movie DB/Utility/Utils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ struct Utils {
204204
}
205205

206206
static func purchasedPro() -> Bool {
207-
return true
207+
true
208208
// TODO: Re-enable for release
209209
// UserDefaults.standard.bool(forKey: JFLiterals.inAppPurchaseIDPro)
210210
}

Movie DB/Views/Add Media/AddMediaView.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ struct AddMediaView: View {
4242
}))
4343
}
4444
}
45-
.popover(isPresented: $isShowingProPopup) {
45+
.sheet(isPresented: $isShowingProPopup) {
4646
ProInfoView()
4747
}
4848
}
@@ -80,7 +80,7 @@ struct AddMediaView: View {
8080
struct AddMediaView_Previews: PreviewProvider {
8181
static var previews: some View {
8282
Text("")
83-
.popover(isPresented: .constant(true)) {
83+
.sheet(isPresented: .constant(true)) {
8484
AddMediaView()
8585
}
8686
}

Movie DB/Views/Add Media/LookupView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ struct LookupView: View {
3131
.navigationTitle(Strings.TabView.lookupLabel)
3232
}
3333
}
34-
.popover(isPresented: $isShowingProPopup) {
34+
.sheet(isPresented: $isShowingProPopup) {
3535
ProInfoView()
3636
}
3737
}

Movie DB/Views/MediaLists/MediaListsRootView.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ struct MediaListsRootView: View {
4242
}
4343

4444
@State private var selectedMedia: Media?
45+
// Show the sidebar by default
46+
@State private var columnVisibility: NavigationSplitViewVisibility = .all
4547

4648
var body: some View {
47-
NavigationSplitView {
49+
NavigationSplitView(columnVisibility: $columnVisibility) {
4850
List {
4951
// MARK: - Default Lists (disabled during editing)
5052
Section(Strings.Lists.defaultListsHeader) {
@@ -165,6 +167,7 @@ struct MediaListsRootView: View {
165167
}
166168
.accessibilityIdentifier("new-custom-list")
167169
}
170+
.accessibilityIdentifier("new-list")
168171
}
169172
}
170173

Movie DB/Views/MediaLists/User List Views/DynamicMediaListView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct DynamicMediaListView: View {
2727
ListConfigurationButton($isShowingConfiguration)
2828
}
2929
// MARK: Editing View / Configuration View
30-
.popover(isPresented: $isShowingConfiguration) {
30+
.sheet(isPresented: $isShowingConfiguration) {
3131
ListConfigurationView(list: list) { list in
3232
// MARK: List Details
3333
// This binding uses the global list property defined in DynamicMediaListView, not the parameter

Movie DB/Views/MediaLists/User List Views/UserMediaListView.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ struct UserMediaListView: View {
3434
ListConfigurationButton($isShowingConfiguration)
3535
}
3636
// MARK: Editing View / Configuration View
37-
.popover(isPresented: $isShowingConfiguration) {
37+
.sheet(isPresented: $isShowingConfiguration) {
3838
ListConfigurationView(list: list) { list in
3939
MediaListEditingSection(name: $list.name, iconName: $list.iconName)
4040
}

Movie DB/Views/Settings/ImportExport/ImportExportSection.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ struct ImportExportSection: View {
3232
ExportTagsButton(config: $config)
3333
}
3434
// MARK: Import Log Popover
35-
.popover(isPresented: $config.importLogShowing) {
35+
.sheet(isPresented: $config.importLogShowing) {
3636
if let logger = $config.importLogger.wrappedValue {
3737
ImportLogViewer(logger: logger)
3838
} else {

Movie DB/Views/Settings/LibraryActionsSection.swift

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,16 @@ struct LibraryActionsSection: View {
2525
Button(Strings.Settings.reloadLibraryLabel, action: self.reloadHandler)
2626
Button(Strings.Settings.resetLibraryLabel, action: self.resetLibrary)
2727
#if DEBUG
28-
Button("Debug") {
29-
// swiftlint:disable line_length
30-
print("Medias: \(Utils.allMedias(context: PersistenceController.viewContext).count)")
31-
print("Genres: \(Utils.allGenres(context: PersistenceController.viewContext).count)")
32-
print("Tags: \(Utils.allObjects(entityName: "Tag", context: PersistenceController.viewContext).count)")
33-
print("ProductionCompany: \(Utils.allObjects(entityName: "ProductionCompany", context: PersistenceController.viewContext).count)")
34-
// swiftlint:enable line_length
28+
// Don't show the debug button when doing App Store screenshots via Fastlane
29+
if ProcessInfo.processInfo.environment["FASTLANE_SNAPSHOT"] != "YES" {
30+
Button("Debug") {
31+
// swiftlint:disable line_length
32+
print("Medias: \(Utils.allMedias(context: PersistenceController.viewContext).count)")
33+
print("Genres: \(Utils.allGenres(context: PersistenceController.viewContext).count)")
34+
print("Tags: \(Utils.allObjects(entityName: "Tag", context: PersistenceController.viewContext).count)")
35+
print("ProductionCompany: \(Utils.allObjects(entityName: "ProductionCompany", context: PersistenceController.viewContext).count)")
36+
// swiftlint:enable line_length
37+
}
3538
}
3639
#endif
3740
}

0 commit comments

Comments
 (0)