Pre-release fixes v0.8.1 2

This commit is contained in:
koalasat
2025-08-10 16:09:53 +02:00
parent 9b9ec82b04
commit 1bede6d241
4 changed files with 29 additions and 26 deletions

View File

@ -105,13 +105,6 @@ class WebAppInterface(private val context: MainActivity, private val webView: We
@JavascriptInterface @JavascriptInterface
fun copyToClipboard(message: String) { 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 { try {
// Copy to clipboard // Copy to clipboard
val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as android.content.ClipboardManager val clipboard = context.getSystemService(Context.CLIPBOARD_SERVICE) as android.content.ClipboardManager

View File

@ -88,9 +88,7 @@ const AuditPGPDialog = ({
const [passphrase, setPassphrase] = useState<string>(); const [passphrase, setPassphrase] = useState<string>();
useEffect(() => { useEffect(() => {
const slot = order const slot = garage.getSlot();
? garage.getSlotByOrder(order?.shortAlias ?? '', order?.id ?? 0)
: garage.getSlot();
setSlot(slot); setSlot(slot);
setOwnPubKey(slot?.getRobot()?.pubKey ?? ''); setOwnPubKey(slot?.getRobot()?.pubKey ?? '');
setOwnEncPrivKey(slot?.getRobot()?.encPrivKey ?? ''); setOwnEncPrivKey(slot?.getRobot()?.encPrivKey ?? '');

View File

@ -60,6 +60,7 @@ export const ChatPrompt = ({
const [undoSentButton, setUndoSentButton] = useState<boolean>(false); const [undoSentButton, setUndoSentButton] = useState<boolean>(false);
const [audit, setAudit] = useState<boolean>(false); const [audit, setAudit] = useState<boolean>(false);
const [peerPubKey, setPeerPubKey] = useState<string>(); const [peerPubKey, setPeerPubKey] = useState<string>();
const [enableCollaborativeButton, setEnableCollaborativeButton] = useState<boolean>(false);
const [enableDisputeButton, setEnableDisputeButton] = useState<boolean>(false); const [enableDisputeButton, setEnableDisputeButton] = useState<boolean>(false);
const [enableDisputeTime, setEnableDisputeTime] = useState<Date>(new Date(order.expires_at)); const [enableDisputeTime, setEnableDisputeTime] = useState<Date>(new Date(order.expires_at));
const [text, setText] = useState<string>(''); const [text, setText] = useState<string>('');
@ -92,6 +93,8 @@ export const ChatPrompt = ({
if (order.status === 9) { if (order.status === 9) {
// No fiat sent yet // No fiat sent yet
setEnableCollaborativeButton(true);
if (order.is_buyer) { if (order.is_buyer) {
setSentButton(true); setSentButton(true);
setReceivedButton(false); setReceivedButton(false);
@ -117,6 +120,8 @@ export const ChatPrompt = ({
} }
} else if (order.status === 10) { } else if (order.status === 10) {
// Fiat has been sent already // Fiat has been sent already
setEnableCollaborativeButton(false);
if (order.is_buyer) { if (order.is_buyer) {
setSentButton(false); setSentButton(false);
setUndoSentButton(true); setUndoSentButton(true);
@ -301,21 +306,28 @@ export const ChatPrompt = ({
</Grid> </Grid>
</Tooltip> </Tooltip>
<Grid item xs={1} style={{ width: '100%', marginTop: 20 }}> <Tooltip
<Button placement='top'
fullWidth enterTouchDelay={0}
onClick={() => { title={t("Orders can't be cancelled if fiat has been sent.")}
setOpenOrderOptions(false); >
onClickCollabCancel(); <Grid item xs={1} style={{ width: '100%', marginTop: 20 }}>
}} <Button
size='large' fullWidth
variant='contained' onClick={() => {
color='secondary' setOpenOrderOptions(false);
startIcon={<Handshake />} onClickCollabCancel();
> }}
{t('Collaborative Cancel')} size='large'
</Button> variant='contained'
</Grid> color='secondary'
startIcon={<Handshake />}
disabled={!enableCollaborativeButton}
>
{t('Collaborative Cancel')}
</Button>
</Grid>
</Tooltip>
</Grid> </Grid>
</DialogContent> </DialogContent>
</DialogContent> </DialogContent>

View File

@ -58,7 +58,7 @@ class BaseSettings {
}); });
systemClient.getItem('settings_notifications').then((result) => { systemClient.getItem('settings_notifications').then((result) => {
this.androidNotifications = result === 'true'; this.androidNotifications = !result ? client === 'mobile' : result === 'true';
}); });
systemClient.getItem('settings_use_proxy').then((result) => { systemClient.getItem('settings_use_proxy').then((result) => {