Skip to content

Commit

Permalink
FIX: styles, nacigation actions
Browse files Browse the repository at this point in the history
  • Loading branch information
limpbrains committed May 28, 2020
1 parent abbea74 commit 1b894ee
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
29 changes: 11 additions & 18 deletions App.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const loc = require('./loc');
const BlueApp = require('./BlueApp');

export default class App extends React.Component {
navigator = null;
navigation = null;

state = {
appState: AppState.currentState,
Expand All @@ -47,13 +47,11 @@ export default class App extends React.Component {

popInitialAction = async data => {
if (data) {
// eslint-disable-next-line no-unused-expressions
this.navigator.dismiss;
const wallet = BlueApp.getWallets().find(wallet => wallet.getID() === data.userInfo.url.split('wallet/')[1]);
this.navigator.dispatch(
this.navigation.dispatch(
CommonActions.navigate({
key: `WalletTransactions-${wallet.getID()}`,
name: 'WalletTransactions',
key: `WalletTransactions-${wallet.getID()}`,
params: {
wallet,
},
Expand All @@ -68,12 +66,10 @@ export default class App extends React.Component {
} else {
const isViewAllWalletsEnabled = await OnAppLaunch.isViewAllWalletsEnabled();
if (!isViewAllWalletsEnabled) {
// eslint-disable-next-line no-unused-expressions
this.navigator.dismiss;
const selectedDefaultWallet = await OnAppLaunch.getSelectedDefaultWallet();
const wallet = BlueApp.getWallets().find(wallet => wallet.getID() === selectedDefaultWallet.getID());
if (wallet) {
this.navigator.dispatch(
this.navigation.dispatch(
CommonActions.navigate({
name: 'WalletTransactions',
key: `WalletTransactions-${wallet.getID()}`,
Expand All @@ -90,9 +86,7 @@ export default class App extends React.Component {

walletQuickActions = data => {
const wallet = BlueApp.getWallets().find(wallet => wallet.getID() === data.userInfo.url.split('wallet/')[1]);
// eslint-disable-next-line no-unused-expressions
this.navigator.dismiss;
this.navigator.dispatch(
this.navigation.dispatch(
CommonActions.navigate({
name: 'WalletTransactions',
key: `WalletTransactions-${wallet.getID()}`,
Expand Down Expand Up @@ -150,8 +144,8 @@ export default class App extends React.Component {
isBothBitcoinAndLightningWalletSelect = wallet => {
const clipboardContent = this.state.clipboardContent;
if (wallet.chain === Chain.ONCHAIN) {
this.navigator &&
this.navigator.dispatch(
this.navigation &&
this.navigation.dispatch(
CommonActions.navigate({
name: 'SendDetails',
params: {
Expand All @@ -161,8 +155,8 @@ export default class App extends React.Component {
}),
);
} else if (wallet.chain === Chain.OFFCHAIN) {
this.navigator &&
this.navigator.dispatch(
this.navigation &&
this.navigation.dispatch(
CommonActions.navigate({
name: 'ScanLndInvoice',
params: {
Expand All @@ -175,8 +169,7 @@ export default class App extends React.Component {
};

handleOpenURL = event => {
// DeeplinkSchemaMatch.navigationRouteFor(event, value => this.navigator && this.navigator.dispatch(CommonActions.navigate(value)));
DeeplinkSchemaMatch.navigationRouteFor(event, value => this.navigator && this.navigator.navigate(...value));
DeeplinkSchemaMatch.navigationRouteFor(event, value => this.navigation && this.navigation.navigate(...value));
};

renderClipboardContentModal = () => {
Expand Down Expand Up @@ -224,7 +217,7 @@ export default class App extends React.Component {
<View style={{ flex: 1 }}>
<NavigationContainer
ref={nav => {
this.navigator = nav;
this.navigation = nav;
NavigationService.setTopLevelNavigator(nav);
}}
>
Expand Down
1 change: 1 addition & 0 deletions BlueComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,7 @@ export const BlueCreateTxNavigationStyle = (navigation, withAdvancedOptionsMenuB
backgroundColor: BlueApp.settings.brandingColor,
borderBottomWidth: 0,
elevation: 0,
shadowOffset: { height: 0, width: 0 },
},
headerTitleStyle: {
fontWeight: '600',
Expand Down
4 changes: 2 additions & 2 deletions ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ PODS:
- React
- RemobileReactNativeQrcodeLocalImage (1.0.4):
- React
- RNCAsyncStorage (1.8.1):
- RNCAsyncStorage (1.10.0):
- React
- RNCMaskedView (0.1.10):
- React
Expand Down Expand Up @@ -533,7 +533,7 @@ SPEC CHECKSUMS:
ReactCommon: 198c7c8d3591f975e5431bec1b0b3b581aa1c5dd
ReactNativePrivacySnapshot: cc295e45dc22810e9ff2c93380d643de20a77015
RemobileReactNativeQrcodeLocalImage: 57aadc12896b148fb5e04bc7c6805f3565f5c3fa
RNCAsyncStorage: 00bdf63f7f1e0f11d3323533dba4f222e58bf092
RNCAsyncStorage: b34d2399d3e25db01d5b881949b503bd3c224d57
RNCMaskedView: f5c7d14d6847b7b44853f7acb6284c1da30a3459
RNDefaultPreference: 12d246dd2222e66dadcd76cc1250560663befc3a
RNDeviceInfo: 12faae605ba42a1a5041c3c41a77834bc23f049d
Expand Down
2 changes: 1 addition & 1 deletion screen/send/details.js
Original file line number Diff line number Diff line change
Expand Up @@ -865,7 +865,7 @@ export default class SendDetails extends Component {
}
return (
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
<View style={{ flex: 1, justifyContent: 'space-between' }}>
<View style={{ flex: 1, justifyContent: 'space-between', backgroundColor: '#FFFFFF' }}>
<View>
<KeyboardAvoidingView behavior="position">
<ScrollView
Expand Down

0 comments on commit 1b894ee

Please sign in to comment.