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

Remove offline message from BaseOptionsSelector #11173

Merged
merged 3 commits into from
Sep 21, 2022
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
1 change: 0 additions & 1 deletion src/components/IOUConfirmationList.js
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,6 @@ class IOUConfirmationList extends Component {
forceTextUnreadStyle
autoFocus
shouldTextInputAppearBelowOptions
shouldShowOfflineMessage
optionHoveredStyle={canModifyParticipants ? styles.hoveredComponentBG : {}}
footerContent={shouldShowSettlementButton
? (
Expand Down
18 changes: 1 addition & 17 deletions src/components/OptionsSelector/BaseOptionsSelector.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,15 @@ import lodashGet from 'lodash/get';
import React, {Component} from 'react';
import PropTypes from 'prop-types';
import {View, findNodeHandle} from 'react-native';
import {withOnyx} from 'react-native-onyx';
import Button from '../Button';
import FixedFooter from '../FixedFooter';
import OptionsList from '../OptionsList';
import Text from '../Text';
import compose from '../../libs/compose';
import CONST from '../../CONST';
import styles from '../../styles/styles';
import withLocalize, {withLocalizePropTypes} from '../withLocalize';
import TextInput from '../TextInput';
import ArrowKeyFocusManager from '../ArrowKeyFocusManager';
import KeyboardShortcut from '../../libs/KeyboardShortcut';
import ONYXKEYS from '../../ONYXKEYS';
import FullScreenLoadingIndicator from '../FullscreenLoadingIndicator';
import {propTypes as optionsSelectorPropTypes, defaultProps as optionsSelectorDefaultProps} from './optionsSelectorPropTypes';

Expand Down Expand Up @@ -301,11 +297,6 @@ class BaseOptionsSelector extends Component {
</View>
{shouldShowFooter && (
<FixedFooter>
{this.props.shouldShowOfflineMessage && this.props.network.isOffline && (
<Text style={[styles.formError, styles.pb2]}>
{this.props.translate('session.offlineMessage')}
Copy link
Contributor

@roryabraham roryabraham Sep 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This UI string appears unused. We should remove it from the translations files

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated!

</Text>
)}
{shouldShowDefaultConfirmButton && (
<Button
success
Expand All @@ -327,11 +318,4 @@ class BaseOptionsSelector extends Component {
BaseOptionsSelector.defaultProps = defaultProps;
BaseOptionsSelector.propTypes = propTypes;

export default compose(
withLocalize,
withOnyx({
network: {
key: ONYXKEYS.NETWORK,
},
}),
)(BaseOptionsSelector);
export default withLocalize(BaseOptionsSelector);
4 changes: 0 additions & 4 deletions src/components/OptionsSelector/optionsSelectorPropTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ const propTypes = {
/** If true, the text input will be below the options in the selector, not above. */
shouldTextInputAppearBelowOptions: PropTypes.bool,

/** If true, a message will display in the footer if the app is offline. */
shouldShowOfflineMessage: PropTypes.bool,

/** Custom content to display in the footer instead of the default button. */
footerContent: PropTypes.oneOfType([PropTypes.func, PropTypes.node]),

Expand Down Expand Up @@ -111,7 +108,6 @@ const defaultProps = {
confirmButtonText: undefined,
onConfirmSelection: () => {},
shouldTextInputAppearBelowOptions: false,
shouldShowOfflineMessage: false,
footerContent: undefined,
optionHoveredStyle: styles.hoveredComponentBG,
shouldShowOptions: true,
Expand Down
1 change: 0 additions & 1 deletion src/languages/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,6 @@ export default {
},
session: {
offlineMessageRetry: 'Looks like you\'re offline. Please check your connection and try again.',
offlineMessage: 'Looks like you\'re offline.',
},
workspace: {
common: {
Expand Down
1 change: 0 additions & 1 deletion src/languages/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,6 @@ export default {
},
session: {
offlineMessageRetry: 'Parece que estás desconectado. Por favor chequea tu conexión e inténtalo otra vez',
offlineMessage: 'Parece que estás desconectado.',
},
workspace: {
common: {
Expand Down