Skip to content

Commit

Permalink
fix: more comments
Browse files Browse the repository at this point in the history
  • Loading branch information
allroundexperts committed May 10, 2022
1 parent 8a95085 commit 50e38f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ const ImageRenderer = (props) => {

return (
<AttachmentModal
allowDownload
sourceURL={source}
isAuthTokenRequired={isAttachment}
originalFileName={originalFileName}
Expand Down
6 changes: 3 additions & 3 deletions src/components/ThumbnailImage.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ class ThumbnailImage extends PureComponent {
super(props);

this.updateImageSize = this.updateImageSize.bind(this);
const {width, height} = this.calculateThumbnailImageSize({width: props.imageWidth, height: props.imageHeight});
const {width, height} = this.calculateThumbnailImageSize(props.imageWidth, props.imageHeight);
this.state = {
thumbnailWidth: width,
thumbnailHeight: height,
};
}

calculateThumbnailImageSize({width, height}) {
calculateThumbnailImageSize(width, height) {
if (!width || !height) { return {}; }

// Width of the thumbnail works better as a constant than it does
Expand All @@ -66,7 +66,7 @@ class ThumbnailImage extends PureComponent {
}

updateImageSize({width, height}) {
const {width: thumbnailScreenWidth, height: thumbnailScreenHeight} = this.calculateThumbnailImageSize({width, height});
const {width: thumbnailScreenWidth, height: thumbnailScreenHeight} = this.calculateThumbnailImageSize(width, height);
this.setState({thumbnailWidth: thumbnailScreenWidth, thumbnailHeight: Math.max(40, thumbnailScreenHeight)});
}

Expand Down

0 comments on commit 50e38f7

Please sign in to comment.