[rst-commit] r172 - in /redwax-signtext-macos/trunk/Redwax SignText/Redwax SignText: Crypto.swift SignTextContentView.swift
rst-commit at redwax.eu
rst-commit at redwax.eu
Wed Jul 3 22:27:49 CEST 2024
Author: minfrin at redwax.eu
Date: Wed Jul 3 22:27:48 2024
New Revision: 172
Log:
Make the cancel button work per tab, instead of cancel everything.
Modified:
redwax-signtext-macos/trunk/Redwax SignText/Redwax SignText/Crypto.swift
redwax-signtext-macos/trunk/Redwax SignText/Redwax SignText/SignTextContentView.swift
Modified: redwax-signtext-macos/trunk/Redwax SignText/Redwax SignText/Crypto.swift
==============================================================================
--- redwax-signtext-macos/trunk/Redwax SignText/Redwax SignText/Crypto.swift (original)
+++ redwax-signtext-macos/trunk/Redwax SignText/Redwax SignText/Crypto.swift Wed Jul 3 22:27:48 2024
@@ -60,7 +60,7 @@
}
-func doCancel() async {
+func doCancel(signText: SignTextData) async {
/* exit app if no more views */
exit(0)
Modified: redwax-signtext-macos/trunk/Redwax SignText/Redwax SignText/SignTextContentView.swift
==============================================================================
--- redwax-signtext-macos/trunk/Redwax SignText/Redwax SignText/SignTextContentView.swift (original)
+++ redwax-signtext-macos/trunk/Redwax SignText/Redwax SignText/SignTextContentView.swift Wed Jul 3 22:27:48 2024
@@ -80,11 +80,18 @@
.disabled(certificates.isEmpty)
Button("Cancel") {
- Task { @MainActor in
- do {
- await doCancel()
- }
+
+ /* tell the browser we're done */
+ sendCancel(signTextData: signText)
+
+ /* we're done, remove from the model list */
+ modelData.signTexts.removeValue(forKey: signText.id)
+
+ /* exit app if no more views */
+ if (modelData.signTexts.count == 0) {
+ exit(0)
}
+
}
}
.buttonStyle(.bordered)
More information about the rst-commit
mailing list