Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Several minor improvements #1860

Merged
merged 1 commit into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions components/Screen.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,17 @@
import { observer } from 'mobx-react';
import React from 'react';
import { SafeAreaView } from 'react-native';
import { PureComponent, ReactNode } from 'react';
import { SafeAreaView, ViewStyle } from 'react-native';
import LinearGradient from 'react-native-linear-gradient';

import { themeColor } from '../utils/ThemeUtils';

interface ScreenProps {
children?: ReactNode;
style?: ViewStyle;
}

@observer
export default class Screen extends React.PureComponent {
export default class Screen extends PureComponent<ScreenProps> {
render() {
return (
<LinearGradient
Expand Down
5 changes: 3 additions & 2 deletions components/WalletHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,12 +70,13 @@ const ActivityButton = ({ navigation }: { navigation: any }) => (
<Button
icon={{
name: 'list',
size: 40
size: 40,
color: themeColor('text')
}}
containerStyle={{ top: -7 }}
iconOnly
onPress={() => navigation.navigate('Activity')}
></Button>
/>
</View>
);

Expand Down
2 changes: 1 addition & 1 deletion views/LnurlPay/Success.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default class LnurlPaySuccess extends React.Component<LnurlPaySuccessProp
</Text>
<Text
style={{
fontFamily: 'Lato-Regular',
fontFamily: 'PPNeueMontreal-Book',
color: color || themeColor('text')
}}
>
Expand Down
4 changes: 2 additions & 2 deletions views/SendingLightning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ export default class SendingLightning extends React.Component<
color: themeColor('text'),
paddingTop:
windowSize.height * 0.03,
fontFamily: 'Lato-Regular',
fontFamily: 'PPNeueMontreal-Book',
fontSize:
windowSize.width *
windowSize.scale *
Expand Down Expand Up @@ -247,7 +247,7 @@ export default class SendingLightning extends React.Component<
<Text
style={{
color: themeColor('text'),
fontFamily: 'Lato-Regular',
fontFamily: 'PPNeueMontreal-Book',
fontSize:
windowSize.width *
windowSize.scale *
Expand Down
2 changes: 1 addition & 1 deletion views/SendingOnChain.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ export default class SendingOnChain extends React.Component<
<Text
style={{
color: themeColor('text'),
fontFamily: 'Lato-Regular',
fontFamily: 'PPNeueMontreal-Book',
fontSize:
windowSize.width *
windowSize.scale *
Expand Down
8 changes: 4 additions & 4 deletions views/Settings/Contacts.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -257,10 +257,8 @@ export default class Contacts extends React.Component<
>
<Header
leftComponent="Back"
containerStyle={{
borderBottomWidth: 0
}}
rightComponent={!SendScreen && <AddButton />}
containerStyle={{ borderBottomWidth: 0 }}
rightComponent={SendScreen ? undefined : <AddButton />}
navigation={navigation}
/>
{contacts.length > 0 && (
Expand Down Expand Up @@ -355,6 +353,7 @@ export default class Contacts extends React.Component<
data={favoriteContacts}
renderItem={this.renderContactItem}
keyExtractor={(item, index) => index.toString()}
scrollEnabled={false}
/>

{/* Render non-favorite contacts */}
Expand Down Expand Up @@ -384,6 +383,7 @@ export default class Contacts extends React.Component<
data={nonFavoriteContacts}
renderItem={this.renderContactItem}
keyExtractor={(item, index) => index.toString()}
scrollEnabled={false}
/>
{loading ? (
<LoadingIndicator />
Expand Down
1 change: 1 addition & 0 deletions views/Settings/PointOfSale.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,7 @@ export default class PointOfSale extends React.Component<
keyExtractor={(item, index) =>
`${item.label}-${index}`
}
scrollEnabled={false}
/>
)}
</ScrollView>
Expand Down
1 change: 1 addition & 0 deletions views/Settings/Security.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ export default class Security extends React.Component<
`${item.translateKey}-${index}`
}
ItemSeparatorComponent={this.renderSeparator}
scrollEnabled={false}
/>
{settings.supportedBiometryType !== undefined && (
<ListItem
Expand Down
4 changes: 2 additions & 2 deletions views/Settings/SocialMedia.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function Help(props: HelpProps) {
text: localeString('views.Settings.SocialMedia.title'),
style: {
color: themeColor('text'),
fontFamily: 'Lato-Regular'
fontFamily: 'PPNeueMontreal-Book'
}
}}
navigation={navigation}
Expand All @@ -67,7 +67,7 @@ function Help(props: HelpProps) {
<ListItem.Title
style={{
color: themeColor('text'),
fontFamily: 'Lato-Regular'
fontFamily: 'PPNeueMontreal-Book'
}}
>
{item.label}
Expand Down