Skip to content

Commit

Permalink
update modules and fix build
Browse files Browse the repository at this point in the history
Signed-off-by: Joseph Mattiello <git@joemattiello.com>
  • Loading branch information
JoeMatt committed Nov 29, 2024
1 parent 4b85877 commit db8d43f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 20 deletions.
6 changes: 3 additions & 3 deletions Provenance.xcworkspace/xcshareddata/swiftpm/Package.resolved
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@
"repositoryURL": "https://github.com/FlineDev/FreemiumKit.git",
"state": {
"branch": null,
"revision": "68a3c35053afe0c564585da4f16315e1bbcda441",
"version": "1.14.0"
"revision": "ff45d8e3fc7af5255f97e059cc95524dfa320196",
"version": "1.15.0"
}
},
{
Expand Down Expand Up @@ -285,7 +285,7 @@
"repositoryURL": "https://github.com/pointfreeco/swift-perception.git",
"state": {
"branch": "main",
"revision": "dccdf5aed1db969afa11d6fbd36b96a4932ebe8c",
"revision": "8d52279b9809ef27eabe7d5420f03734528f19da",
"version": null
}
},
Expand Down
39 changes: 22 additions & 17 deletions Provenance/Main UI/PVAppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -102,13 +102,16 @@ final class PVAppDelegate: UIResponder, GameLaunchingAppDelegate, UIApplicationD
/// Reimport the library
NotificationCenter.default.publisher(for: .PVReimportLibrary)
.flatMap { _ in

Future<Void, Never> { promise in
RomDatabase.refresh()
if let _ = self.gameLibraryViewController {
self.gameLibraryViewController?.checkROMs(false)
} else {
if let updates = await self.appState?.libraryUpdatesController {
await updates.importROMDirectories()
Task.detached { @MainActor in
RomDatabase.refresh()
if let _ = self.gameLibraryViewController {
self.gameLibraryViewController?.checkROMs(false)
} else {
if let updates = await self.appState?.libraryUpdatesController {
await updates.importROMDirectories()
}
}
}
promise(.success(()))
Expand All @@ -121,19 +124,21 @@ final class PVAppDelegate: UIResponder, GameLaunchingAppDelegate, UIApplicationD
NotificationCenter.default.publisher(for: .PVRefreshLibrary)
.flatMap { _ in
Future<Void, Error> { promise in
do {
try RomDatabase.sharedInstance.deleteAllGames()
if let _ = self.gameLibraryViewController {
self.gameLibraryViewController?.checkROMs(false)
} else {
if let updates = await self.appState?.libraryUpdatesController {
await updates.importROMDirectories()
Task { @MainActor in
do {
try RomDatabase.sharedInstance.deleteAllGames()
if let _ = self.gameLibraryViewController {
self.gameLibraryViewController?.checkROMs(false)
} else {
if let updates = await self.appState?.libraryUpdatesController {
await updates.importROMDirectories()
}
}
promise(.success(()))
} catch {
ELOG("Failed to refresh all objects. \(error.localizedDescription)")
promise(.failure(error))
}
promise(.success(()))
} catch {
ELOG("Failed to refresh all objects. \(error.localizedDescription)")
promise(.failure(error))
}
}
}
Expand Down

0 comments on commit db8d43f

Please sign in to comment.