Skip to content

Commit

Permalink
Revert D16543433: [Fabric][JS] Use SoundManager in Pressability and T…
Browse files Browse the repository at this point in the history
…ouchable

Differential Revision:
D16543433

Original commit changeset: a2ba060bc480

fbshipit-source-id: 0ba31019fb7a9e77577e495782a3b10029575d22
  • Loading branch information
mdvacca authored and facebook-github-bot committed Aug 14, 2019
1 parent 9dbe5e2 commit 441c00a
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Libraries/Components/Touchable/Touchable.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
const TVEventHandler = require('../AppleTV/TVEventHandler');
const UIManager = require('../../ReactNative/UIManager');
const View = require('../View/View');
const SoundManager = require('../Sound/SoundManager');

const keyMirror = require('fbjs/lib/keyMirror');
const normalizeColor = require('../../Color/normalizeColor');
Expand Down Expand Up @@ -876,7 +875,7 @@ const TouchableMixin = {
this._endHighlight(e);
}
if (Platform.OS === 'android' && !this.props.touchSoundDisabled) {
SoundManager.playTouchSound();
this._playTouchSound();
}
this.touchableHandlePress(e);
}
Expand All @@ -886,6 +885,10 @@ const TouchableMixin = {
this.touchableDelayTimeout = null;
},

_playTouchSound: function() {
UIManager.playTouchSound();
},

_startHighlight: function(e: PressEvent) {
this._savePressInLocation(e);
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);
Expand Down

0 comments on commit 441c00a

Please sign in to comment.