mirror of
https://github.com/BlueWallet/BlueWallet.git
synced 2024-11-19 09:50:15 +01:00
FIX: Don't show clipboard modal if user has already acted on it
This commit is contained in:
parent
5588ad1eb2
commit
27301965b7
6
App.js
6
App.js
@ -43,7 +43,7 @@ const App = () => {
|
||||
const appState = useRef(AppState.currentState);
|
||||
const [isClipboardContentModalVisible, setIsClipboardContentModalVisible] = useState(false);
|
||||
const [clipboardContentType, setClipboardContentType] = useState();
|
||||
const [clipboardContent, setClipboardContent] = useState('');
|
||||
const clipboardContent = useRef();
|
||||
const colorScheme = useColorScheme();
|
||||
const stylesHook = StyleSheet.create({
|
||||
modalContent: {
|
||||
@ -217,7 +217,7 @@ const App = () => {
|
||||
const isBothBitcoinAndLightning = DeeplinkSchemaMatch.isBothBitcoinAndLightning(clipboard);
|
||||
if (
|
||||
!isAddressFromStoredWallet &&
|
||||
clipboardContent !== clipboard &&
|
||||
clipboardContent.current !== clipboard &&
|
||||
(isBitcoinAddress || isLightningInvoice || isLNURL || isBothBitcoinAndLightning)
|
||||
) {
|
||||
if (isBitcoinAddress) {
|
||||
@ -229,7 +229,7 @@ const App = () => {
|
||||
}
|
||||
setIsClipboardContentModalVisible(true);
|
||||
}
|
||||
setClipboardContent(clipboard);
|
||||
clipboardContent.current = clipboard;
|
||||
}
|
||||
if (nextAppState) {
|
||||
appState.current = nextAppState;
|
||||
|
Loading…
Reference in New Issue
Block a user