Merge pull request #441 from vector-im/dbkr/fix_ptt_button_mobile

Fix the PTT button on mobile
This commit is contained in:
David Baker 2022-07-05 13:16:56 +01:00 committed by GitHub
commit 2cc291dccd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import React, { useCallback, useState, createRef } from "react"; import React, { useCallback, useState, useRef } from "react";
import classNames from "classnames"; import classNames from "classnames";
import { useSpring, animated } from "@react-spring/web"; import { useSpring, animated } from "@react-spring/web";
@ -54,7 +54,7 @@ export const PTTButton: React.FC<Props> = ({
enqueueNetworkWaiting, enqueueNetworkWaiting,
setNetworkWaiting, setNetworkWaiting,
}) => { }) => {
const buttonRef = createRef<HTMLButtonElement>(); const buttonRef = useRef<HTMLButtonElement>();
const [activeTouchId, setActiveTouchId] = useState<number | null>(null); const [activeTouchId, setActiveTouchId] = useState<number | null>(null);