mirror of
https://github.com/RoboSats/robosats.git
synced 2025-08-13 14:57:17 +00:00
Pre-release fixes v0.8.1 2
This commit is contained in:
@ -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
|
||||
|
@ -88,9 +88,7 @@ const AuditPGPDialog = ({
|
||||
const [passphrase, setPassphrase] = useState<string>();
|
||||
|
||||
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 ?? '');
|
||||
|
@ -60,6 +60,7 @@ export const ChatPrompt = ({
|
||||
const [undoSentButton, setUndoSentButton] = useState<boolean>(false);
|
||||
const [audit, setAudit] = useState<boolean>(false);
|
||||
const [peerPubKey, setPeerPubKey] = useState<string>();
|
||||
const [enableCollaborativeButton, setEnableCollaborativeButton] = useState<boolean>(false);
|
||||
const [enableDisputeButton, setEnableDisputeButton] = useState<boolean>(false);
|
||||
const [enableDisputeTime, setEnableDisputeTime] = useState<Date>(new Date(order.expires_at));
|
||||
const [text, setText] = useState<string>('');
|
||||
@ -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 = ({
|
||||
</Grid>
|
||||
</Tooltip>
|
||||
|
||||
<Grid item xs={1} style={{ width: '100%', marginTop: 20 }}>
|
||||
<Button
|
||||
fullWidth
|
||||
onClick={() => {
|
||||
setOpenOrderOptions(false);
|
||||
onClickCollabCancel();
|
||||
}}
|
||||
size='large'
|
||||
variant='contained'
|
||||
color='secondary'
|
||||
startIcon={<Handshake />}
|
||||
>
|
||||
{t('Collaborative Cancel')}
|
||||
</Button>
|
||||
</Grid>
|
||||
<Tooltip
|
||||
placement='top'
|
||||
enterTouchDelay={0}
|
||||
title={t("Orders can't be cancelled if fiat has been sent.")}
|
||||
>
|
||||
<Grid item xs={1} style={{ width: '100%', marginTop: 20 }}>
|
||||
<Button
|
||||
fullWidth
|
||||
onClick={() => {
|
||||
setOpenOrderOptions(false);
|
||||
onClickCollabCancel();
|
||||
}}
|
||||
size='large'
|
||||
variant='contained'
|
||||
color='secondary'
|
||||
startIcon={<Handshake />}
|
||||
disabled={!enableCollaborativeButton}
|
||||
>
|
||||
{t('Collaborative Cancel')}
|
||||
</Button>
|
||||
</Grid>
|
||||
</Tooltip>
|
||||
</Grid>
|
||||
</DialogContent>
|
||||
</DialogContent>
|
||||
|
@ -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) => {
|
||||
|
Reference in New Issue
Block a user