Skip to content

Commit

Permalink
Update Jailbreak.swift
Browse files Browse the repository at this point in the history
  • Loading branch information
wwg135 authored Aug 5, 2023
1 parent 3bae346 commit 8b6ae6c
Showing 1 changed file with 1 addition and 18 deletions.
19 changes: 1 addition & 18 deletions Dopamine/Dopamine/UI/Views/Jailbreak.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,24 +38,7 @@ func respring() {
}

func userspaceReboot() {
UIImpactFeedbackGenerator(style: .soft).impactOccurred()

// MARK: Fade out Animation

let view = UIView(frame: UIScreen.main.bounds)
view.backgroundColor = .black
view.alpha = 0

for window in UIApplication.shared.connectedScenes.map({ $0 as? UIWindowScene }).compactMap({ $0 }).flatMap({ $0.windows.map { $0 } }) {
window.addSubview(view)
UIView.animate(withDuration: 0.2, delay: 0, animations: {
view.alpha = 1
})
}

DispatchQueue.main.asyncAfter(deadline: .now() + 0.2, execute: {
_ = execCmd(args: [rootifyPath(path: "/basebin/jbctl")!, "reboot_userspace"])
})
_ = execCmd(args: [rootifyPath(path: "/basebin/jbctl")!, "reboot_userspace"])
}

func reboot() {
Expand Down

0 comments on commit 8b6ae6c

Please sign in to comment.