fix some of the app elements periodically stop responding on the android (#14935)

This commit is contained in:
Parvesh Monu 2023-01-31 19:13:02 +05:30 committed by GitHub
parent bfb2863774
commit 6bdd3ceded
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 19 additions and 16 deletions

View File

@ -5,7 +5,6 @@
[quo.components.tooltip :as tooltip]
[quo.design-system.colors :as colors]
[quo.design-system.spacing :as spacing]
[quo.gesture-handler :as gh]
[quo.haptic :as haptic]
[quo.platform :as platform]
[quo.react-native :as rn]
@ -243,7 +242,7 @@
(not on-long-press))
rn/view
animated animated/pressable
:else gh/touchable-highlight)]
:else rn/touchable-highlight)]
[rn/view
{:background-color (cond (not= background-color nil)
background-color
@ -255,7 +254,8 @@
(merge {:type :list-item
:disabled disabled
:bg-color (when active-background-enabled active-background)
:accessibility-label accessibility-label}
:accessibility-label accessibility-label
:underlay-color (:interactive-02 @colors/theme)}
(when on-press
{:on-press (fn []
(optional-haptic)

View File

@ -28,6 +28,10 @@
(def long-press-gesture-handler
(reagent/adapt-react-class LongPressGestureHandler))
;; NOTE - Touchables provided by react-native-gesture-handler has an issue,
;; if it is pressed rapidly it becomes unresponsive and ignores further on-press calls.
;; Issue: https://github.com/status-im/status-mobile/issues/14020
(def touchable-without-feedback-class TouchableWithoutFeedback)
(def touchable-without-feedback

View File

@ -4,7 +4,6 @@
[clojure.string :as string]
[quo.core :as quo]
[quo.design-system.colors :as colors]
[quo.gesture-handler :as gh]
[re-frame.core :as re-frame]
[reagent.core :as reagent]
[status-im.ethereum.tokens :as tokens]
@ -369,7 +368,9 @@
(defn error-item
[]
(fn [title show-error]
[gh/touchable-highlight {:on-press #(swap! show-error not)}
[react/touchable-highlight
{:on-press #(swap! show-error not)
:underlay-color (:interactive-02 @colors/theme)}
[react/view
{:style {:align-items :center
:flex-direction :row}}

View File

@ -1,6 +1,5 @@
(ns status-im.ui2.screens.chat.components.edit.view
(:require [utils.i18n :as i18n]
[quo.gesture-handler :as gesture-handler]
[quo2.core :as quo]
[quo2.foundations.colors :as colors]
[re-frame.core :as rf]
@ -22,14 +21,13 @@
{:weight :medium
:size :paragraph-2}
(i18n/label :t/editing-message)]]]
[gesture-handler/touchable-without-feedback
{:accessibility-label :reply-cancel-button
[quo/button
{:width 24
:size 24
:accessibility-label :reply-cancel-button
:on-press #(do (on-cancel)
(rf/dispatch [:chat.ui/cancel-message-edit]))}
[quo/button
{:width 24
:size 24
:type :outline}
[quo/icon :i/close
{:size 16
:color (colors/theme-colors colors/neutral-100 colors/neutral-40)}]]]])
(rf/dispatch [:chat.ui/cancel-message-edit]))
:type :outline}
[quo/icon :i/close
{:size 16
:color (colors/theme-colors colors/neutral-100 colors/neutral-40)}]]])