From c2fb8f8555312f11612c8952881cfa8435e97a15 Mon Sep 17 00:00:00 2001 From: Robert Daly Date: Thu, 19 Jan 2023 18:29:28 -0500 Subject: [PATCH] fixed some minor issues --- .../AttachmentCarousel/CarouselActions/index.native.js | 2 +- src/components/AttachmentCarousel/index.js | 8 +++++--- src/components/ImageView/index.js | 2 -- src/styles/styles.js | 4 ---- 4 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/AttachmentCarousel/CarouselActions/index.native.js b/src/components/AttachmentCarousel/CarouselActions/index.native.js index 0ea714a06233..d3f577054780 100644 --- a/src/components/AttachmentCarousel/CarouselActions/index.native.js +++ b/src/components/AttachmentCarousel/CarouselActions/index.native.js @@ -9,7 +9,7 @@ const propTypes = { /** Callback to fire when swiping left or right */ onCycleThroughAttachments: PropTypes.func.isRequired, - /** Callback to handle a press event*/ + /** Callback to handle a press event */ onPress: PropTypes.func.isRequired, /** Boolean to prevent a left swipe action */ diff --git a/src/components/AttachmentCarousel/index.js b/src/components/AttachmentCarousel/index.js index be51ff37c340..dbeb110411d8 100644 --- a/src/components/AttachmentCarousel/index.js +++ b/src/components/AttachmentCarousel/index.js @@ -47,11 +47,13 @@ class AttachmentCarousel extends React.Component { constructor(props) { super(props); this.canUseTouchScreen = DeviceCapabilities.canUseTouchScreen(); - this.makeStateWithReports = this.makeStateWithReports.bind(this); this.cycleThroughAttachments = this.cycleThroughAttachments.bind(this); - this.toggleArrowsVisibility = this.toggleArrowsVisibility.bind(this); - this.state = {shouldShowArrow: this.canUseTouchScreen}; + this.state = { + shouldShowArrow: this.canUseTouchScreen, + isForwardDisabled: true, + isBackDisabled: true, + }; } componentDidMount() { diff --git a/src/components/ImageView/index.js b/src/components/ImageView/index.js index 8890dfd1495e..c7e61f4ae39f 100644 --- a/src/components/ImageView/index.js +++ b/src/components/ImageView/index.js @@ -1,7 +1,6 @@ import React, {PureComponent} from 'react'; import PropTypes from 'prop-types'; import {View, Pressable} from 'react-native'; -import _ from 'underscore'; import Image from '../Image'; import styles from '../../styles/styles'; import * as StyleUtils from '../../styles/StyleUtils'; @@ -27,7 +26,6 @@ class ImageView extends PureComponent { super(props); this.scrollableRef = null; this.canUseTouchScreen = DeviceCapabilities.canUseTouchScreen(); - this.debouncedCalculateImageSize = _.debounce(this.calculateImageSize, 220); this.onContainerLayoutChanged = this.onContainerLayoutChanged.bind(this); this.onContainerPressIn = this.onContainerPressIn.bind(this); this.onContainerPress = this.onContainerPress.bind(this); diff --git a/src/styles/styles.js b/src/styles/styles.js index c47445caefae..b9373a9acfda 100644 --- a/src/styles/styles.js +++ b/src/styles/styles.js @@ -2121,10 +2121,6 @@ const styles = { width: '100%', }, - attachmentContainer: { - height: '100%', - }, - leftAttachmentArrow: { zIndex: 23, position: 'absolute',