From 1bede6d24171397baa12856d176a88308ecb4308 Mon Sep 17 00:00:00 2001 From: koalasat Date: Sun, 10 Aug 2025 16:09:53 +0200 Subject: [PATCH] Pre-release fixes v0.8.1 2 --- .../main/java/com/robosats/WebAppInterface.kt | 7 ---- frontend/src/components/Dialogs/AuditPGP.tsx | 4 +- .../src/components/TradeBox/Prompts/Chat.tsx | 42 ++++++++++++------- frontend/src/models/Settings.model.ts | 2 +- 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/android/app/src/main/java/com/robosats/WebAppInterface.kt b/android/app/src/main/java/com/robosats/WebAppInterface.kt index 45296baa..f2e07107 100644 --- a/android/app/src/main/java/com/robosats/WebAppInterface.kt +++ b/android/app/src/main/java/com/robosats/WebAppInterface.kt @@ -105,13 +105,6 @@ class WebAppInterface(private val context: MainActivity, private val webView: We @JavascriptInterface fun copyToClipboard(message: String) { - // Validate input - if (!isValidInput(message)) { - Log.e(TAG, "Invalid input for copyToClipboard") - Toast.makeText(context, "Invalid content for clipboard", Toast.LENGTH_SHORT).show() - return - } - try { // Copy to clipboard val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as android.content.ClipboardManager diff --git a/frontend/src/components/Dialogs/AuditPGP.tsx b/frontend/src/components/Dialogs/AuditPGP.tsx index 4f72c273..6809aa23 100644 --- a/frontend/src/components/Dialogs/AuditPGP.tsx +++ b/frontend/src/components/Dialogs/AuditPGP.tsx @@ -88,9 +88,7 @@ const AuditPGPDialog = ({ const [passphrase, setPassphrase] = useState(); useEffect(() => { - const slot = order - ? garage.getSlotByOrder(order?.shortAlias ?? '', order?.id ?? 0) - : garage.getSlot(); + const slot = garage.getSlot(); setSlot(slot); setOwnPubKey(slot?.getRobot()?.pubKey ?? ''); setOwnEncPrivKey(slot?.getRobot()?.encPrivKey ?? ''); diff --git a/frontend/src/components/TradeBox/Prompts/Chat.tsx b/frontend/src/components/TradeBox/Prompts/Chat.tsx index 94eec28b..250856bd 100644 --- a/frontend/src/components/TradeBox/Prompts/Chat.tsx +++ b/frontend/src/components/TradeBox/Prompts/Chat.tsx @@ -60,6 +60,7 @@ export const ChatPrompt = ({ const [undoSentButton, setUndoSentButton] = useState(false); const [audit, setAudit] = useState(false); const [peerPubKey, setPeerPubKey] = useState(); + const [enableCollaborativeButton, setEnableCollaborativeButton] = useState(false); const [enableDisputeButton, setEnableDisputeButton] = useState(false); const [enableDisputeTime, setEnableDisputeTime] = useState(new Date(order.expires_at)); const [text, setText] = useState(''); @@ -92,6 +93,8 @@ export const ChatPrompt = ({ if (order.status === 9) { // No fiat sent yet + setEnableCollaborativeButton(true); + if (order.is_buyer) { setSentButton(true); setReceivedButton(false); @@ -117,6 +120,8 @@ export const ChatPrompt = ({ } } else if (order.status === 10) { // Fiat has been sent already + setEnableCollaborativeButton(false); + if (order.is_buyer) { setSentButton(false); setUndoSentButton(true); @@ -301,21 +306,28 @@ export const ChatPrompt = ({ - - - + + + + + diff --git a/frontend/src/models/Settings.model.ts b/frontend/src/models/Settings.model.ts index 9dd1f080..6a92ab9e 100644 --- a/frontend/src/models/Settings.model.ts +++ b/frontend/src/models/Settings.model.ts @@ -58,7 +58,7 @@ class BaseSettings { }); systemClient.getItem('settings_notifications').then((result) => { - this.androidNotifications = result === 'true'; + this.androidNotifications = !result ? client === 'mobile' : result === 'true'; }); systemClient.getItem('settings_use_proxy').then((result) => {