Skip to content

Commit

Permalink
microphone stuck fixes (keybase#23883)
Browse files Browse the repository at this point in the history
* WIP

* WIP

* WIP
  • Loading branch information
chrisnojima authored Apr 23, 2020
1 parent f8a8b32 commit cc8e3ff
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
14 changes: 12 additions & 2 deletions shared/chat/audio/audio-recorder.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,13 @@ const AudioRecorder = (props: Props) => {
/>
{!visible ? null : (
<Gateway into="convOverlay">
<Kb.Box2 direction="vertical" fullHeight={true} fullWidth={true} style={styles.container}>
<Kb.Box2
direction="vertical"
fullHeight={true}
fullWidth={true}
style={styles.container}
pointerEvents="box-none"
>
<AudioButton
ampScale={ampScale}
closeDown={closingDown}
Expand Down Expand Up @@ -222,6 +228,7 @@ const AudioButton = (props: ButtonProps) => {
return (
<>
<Kb.NativeAnimated.View
pointerEvents="box-none"
style={{
backgroundColor: Styles.globalColors.white,
borderRadius: outerSize / 2,
Expand Down Expand Up @@ -415,6 +422,7 @@ const AudioSlideToCancel = (props: CancelProps) => {
</Kb.NativeAnimated.View>
) : (
<Kb.NativeAnimated.View
pointerEvents="box-none"
style={{
bottom: 35,
opacity: props.translate,
Expand All @@ -432,7 +440,9 @@ const AudioSlideToCancel = (props: CancelProps) => {
>
<Kb.Box2 direction="horizontal" gap="tiny" centerChildren={true}>
<Kb.Icon sizeType="Tiny" type="iconfont-arrow-left" />
<Kb.Text type="BodySmall">Slide to cancel</Kb.Text>
<Kb.Text type="BodySmall" onClick={props.onCancel}>
Slide to cancel
</Kb.Text>
</Kb.Box2>
</Kb.NativeAnimated.View>
)
Expand Down
2 changes: 2 additions & 0 deletions shared/chat/audio/audio-starter.native.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ const AudioStarter = (props: AudioStarterProps) => {
<Tooltip shouldBeVisible={showToolTip} />
</Gateway>
<Kb.TapGestureHandler
shouldCancelWhenOutside={false}
onHandlerStateChange={({nativeEvent}) => {
if (!props.recording && nativeEvent.state === Kb.GestureState.BEGAN) {
tapLive.current = true
Expand Down Expand Up @@ -131,6 +132,7 @@ const AudioStarter = (props: AudioStarterProps) => {
simultaneousHandlers={panRef}
>
<Kb.PanGestureHandler
shouldCancelWhenOutside={false}
minDeltaX={0}
minDeltaY={0}
onGestureEvent={({nativeEvent}) => {
Expand Down
2 changes: 1 addition & 1 deletion shared/common-adapters/box.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export type Box2Props = {
onMouseUp?: (syntheticEvent: React.SyntheticEvent) => void // desktop only
onMouseOver?: (syntheticEvent: React.SyntheticEvent) => void // desktop only
onCopyCapture?: (syntheticEvent: React.SyntheticEvent) => void // desktop only
pointerEvents?: 'none'
pointerEvents?: 'none' | 'box-none'
style?: StylesCrossPlatform
gap?: keyof typeof globalMargins
gapStart?: boolean
Expand Down

0 comments on commit cc8e3ff

Please sign in to comment.