mirror of
https://github.com/neon443/ShhShell.git
synced 2026-03-11 13:26:16 +00:00
added animated screen flash for bell
screen will flash with a semi transparent white overlay and a bell emoji for 250ms remove bell from nav bar, too distracting with the bell in the muiddle as well
This commit is contained in:
@@ -150,9 +150,10 @@ class SSHHandler: @unchecked Sendable, ObservableObject {
|
||||
}
|
||||
|
||||
func ring() {
|
||||
bell = true
|
||||
DispatchQueue.main.asyncAfter(deadline: .now()+0.2) {
|
||||
self.bell = false
|
||||
Task { @MainActor in
|
||||
withAnimation { self.bell = true }
|
||||
try? await Task.sleep(nanoseconds: 250_000_000) // 250ms
|
||||
withAnimation { self.bell = false }
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user