Skip to content

Commit

Permalink
refactor: LoadingSpinnerOverlay component
Browse files Browse the repository at this point in the history
  • Loading branch information
mdneyazahmad committed Mar 28, 2022
1 parent 74428c3 commit cc3c5b5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 42 deletions.
6 changes: 3 additions & 3 deletions src/components/ImageView/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import styles from '../../styles/styles';
import * as StyleUtils from '../../styles/StyleUtils';
import canUseTouchScreen from '../../libs/canUseTouchscreen';
import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions';
import LoadingSpinnerOverlay from '../LoadingSpinnerOverlay';
import FullscreenLoadingIndicator from '../FullscreenLoadingIndicator';

const propTypes = {
/** URL to full-sized image */
Expand Down Expand Up @@ -255,7 +255,7 @@ class ImageView extends PureComponent {
onLoadStart={this.imageLoadingStart}
onLoadEnd={this.imageLoadingEnd}
/>
{this.state.isLoading && <LoadingSpinnerOverlay />}
{this.state.isLoading && <FullscreenLoadingIndicator />}
</View>
);
}
Expand Down Expand Up @@ -294,7 +294,7 @@ class ImageView extends PureComponent {
/>
</Pressable>

{this.state.isLoading && <LoadingSpinnerOverlay />}
{this.state.isLoading && <FullscreenLoadingIndicator />}
</View>
);
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/ImageView/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import styles from '../../styles/styles';
import * as StyleUtils from '../../styles/StyleUtils';
import variables from '../../styles/variables';
import withWindowDimensions, {windowDimensionsPropTypes} from '../withWindowDimensions';
import LoadingSpinnerOverlay from '../LoadingSpinnerOverlay';
import FullscreenLoadingIndicator from '../FullscreenLoadingIndicator';

/**
* On the native layer, we use a image library to handle zoom functionality
Expand Down Expand Up @@ -137,7 +137,7 @@ class ImageView extends PureComponent {
style={StyleUtils.getWidthAndHeightStyle(this.state.thumbnailWidth, this.state.thumbnailHeight)}
resizeMode="contain"
/>
<LoadingSpinnerOverlay />
<FullscreenLoadingIndicator />
</View>
);
}
Expand Down Expand Up @@ -212,7 +212,7 @@ class ImageView extends PureComponent {
]}
/>
</ImageZoom>
{this.state.isLoading && <LoadingSpinnerOverlay />}
{this.state.isLoading && <FullscreenLoadingIndicator />}
</View>
);
}
Expand Down
4 changes: 2 additions & 2 deletions src/components/ImageWithSizeCalculation.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import PropTypes from 'prop-types';
import Log from '../libs/Log';
import styles from '../styles/styles';
import makeCancellablePromise from '../libs/MakeCancellablePromise';
import LoadingSpinnerOverlay from './LoadingSpinnerOverlay';
import FullscreenLoadingIndicator from './FullscreenLoadingIndicator';

const propTypes = {
/** Url for image to display */
Expand Down Expand Up @@ -122,7 +122,7 @@ class ImageWithSizeCalculation extends PureComponent {
onLoadStart={this.imageLoadingStart}
onLoadEnd={this.imageLoadingEnd}
/>
{this.state.isLoading && <LoadingSpinnerOverlay />}
{this.state.isLoading && <FullscreenLoadingIndicator />}
</View>
);
}
Expand Down
34 changes: 0 additions & 34 deletions src/components/LoadingSpinnerOverlay.js

This file was deleted.

0 comments on commit cc3c5b5

Please sign in to comment.