Skip to content

Commit c9e76ba

Browse files
committed
Revert "Fix script bug"
This reverts commit aa92ef4.
1 parent aa92ef4 commit c9e76ba

File tree

1 file changed

+1
-13
lines changed

1 file changed

+1
-13
lines changed

StikJIT/Views/HomeView.swift

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,7 @@ struct HomeView: View {
255255
var autoScriptData: Data? = nil
256256
var autoScriptName: String? = nil
257257

258-
if !hasAssignedScript(for: selectedBundle),
259-
let scriptInfo = autoScript(for: selectedBundle) {
258+
if let scriptInfo = autoScript(for: selectedBundle) {
260259
autoScriptData = scriptInfo.data
261260
autoScriptName = scriptInfo.name
262261
}
@@ -314,7 +313,6 @@ struct HomeView: View {
314313
config.scriptName = scriptName
315314
}
316315
if config.scriptData == nil, let bundleID = config.bundleID,
317-
!hasAssignedScript(for: bundleID),
318316
let scriptInfo = autoScript(for: bundleID) {
319317
config.scriptData = scriptInfo.data
320318
config.scriptName = scriptInfo.name
@@ -1262,16 +1260,6 @@ struct HomeView: View {
12621260
}
12631261
private func refreshBackground() { }
12641262

1265-
private func hasAssignedScript(for bundleID: String) -> Bool {
1266-
guard enableAdvancedOptions else { return false }
1267-
guard let mapping = UserDefaults.standard.dictionary(forKey: "BundleScriptMap") as? [String: String],
1268-
let scriptName = mapping[bundleID] else { return false }
1269-
let scriptsDirectory = FileManager.default.urls(for: .documentDirectory, in: .userDomainMask)[0]
1270-
.appendingPathComponent("scripts")
1271-
let scriptURL = scriptsDirectory.appendingPathComponent(scriptName)
1272-
return FileManager.default.fileExists(atPath: scriptURL.path)
1273-
}
1274-
12751263
private func autoScript(for bundleID: String) -> (data: Data, name: String)? {
12761264
guard ProcessInfo.processInfo.hasTXM else { return nil }
12771265
guard #available(iOS 26, *) else { return nil }

0 commit comments

Comments
 (0)