change the name of the files
This commit is contained in:
1 parent
faaef84376
commit
dfee862746
2 files changed
+5
-5
No files matched your search
@@ -23,11 +23,11 @@ class SymHandler {
|
|||||||
return getDocumentsDirectory()
|
return getDocumentsDirectory()
|
||||||
}
|
}
|
||||||
|
|
||||||
static func getAppHashURL() -> URL {
|
static func getPosterBoardHashURL() -> URL {
|
||||||
return getLCDocumentsDirectory().appendingPathComponent("NuggetAppHash")
|
return getLCDocumentsDirectory().appendingPathComponent("NuggetPosterBoardHash")
|
||||||
}
|
}
|
||||||
static func getCarPlayHashURL() -> URL {
|
static func getCarPlayHashURL() -> URL {
|
||||||
return getLCDocumentsDirectory().appendingPathComponent("NuggetCarPlayHash")
|
return getLCDocumentsDirectory().appendingPathComponent("NuggetCarPlayWallpaperHash")
|
||||||
}
|
}
|
||||||
|
|
||||||
private static func getSymlinkURL() -> URL {
|
private static func getSymlinkURL() -> URL {
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ struct SettingsView: View {
|
|||||||
Spacer()
|
Spacer()
|
||||||
// Run task to check until file exists from Nugget pc over AFC
|
// Run task to check until file exists from Nugget pc over AFC
|
||||||
Button(action: {
|
Button(action: {
|
||||||
if !FileManager.default.fileExists(atPath: SymHandler.getAppHashURL().path()) {
|
if !FileManager.default.fileExists(atPath: SymHandler.getPosterBoardHashURL().path()) {
|
||||||
// don't show the alert because it is already there
|
// don't show the alert because it is already there
|
||||||
UIApplication.shared.confirmAlert(title: NSLocalizedString("Waiting for app hash...", comment: ""), body: NSLocalizedString("Connect your device to Nugget and click the \"Pocket Poster Helper\" button.", comment: ""), confirmTitle: NSLocalizedString("Cancel", comment: ""), onOK: {
|
UIApplication.shared.confirmAlert(title: NSLocalizedString("Waiting for app hash...", comment: ""), body: NSLocalizedString("Connect your device to Nugget and click the \"Pocket Poster Helper\" button.", comment: ""), confirmTitle: NSLocalizedString("Cancel", comment: ""), onOK: {
|
||||||
cancelWaitForHash()
|
cancelWaitForHash()
|
||||||
@@ -137,7 +137,7 @@ struct SettingsView: View {
|
|||||||
func startWaitForHash() {
|
func startWaitForHash() {
|
||||||
checkingForHash = true
|
checkingForHash = true
|
||||||
hashCheckTask = Task {
|
hashCheckTask = Task {
|
||||||
let filePath = SymHandler.getAppHashURL()
|
let filePath = SymHandler.getPosterBoardHashURL()
|
||||||
while !FileManager.default.fileExists(atPath: filePath.path()) {
|
while !FileManager.default.fileExists(atPath: filePath.path()) {
|
||||||
try? await Task.sleep(nanoseconds: 500_000_000) // Sleep 0.5s
|
try? await Task.sleep(nanoseconds: 500_000_000) // Sleep 0.5s
|
||||||
try Task.checkCancellation()
|
try Task.checkCancellation()
|
||||||
|
|||||||
Reference in new issue
Block a user