Skip to content

Commit 441c00a

Browse files
mdvaccafacebook-github-bot
authored andcommitted
Revert D16543433: [Fabric][JS] Use SoundManager in Pressability and Touchable
Differential Revision: D16543433 Original commit changeset: a2ba060bc480 fbshipit-source-id: 0ba31019fb7a9e77577e495782a3b10029575d22
1 parent 9dbe5e2 commit 441c00a

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Libraries/Components/Touchable/Touchable.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ const StyleSheet = require('../../StyleSheet/StyleSheet');
1919
const TVEventHandler = require('../AppleTV/TVEventHandler');
2020
const UIManager = require('../../ReactNative/UIManager');
2121
const View = require('../View/View');
22-
const SoundManager = require('../Sound/SoundManager');
2322

2423
const keyMirror = require('fbjs/lib/keyMirror');
2524
const normalizeColor = require('../../Color/normalizeColor');
@@ -876,7 +875,7 @@ const TouchableMixin = {
876875
this._endHighlight(e);
877876
}
878877
if (Platform.OS === 'android' && !this.props.touchSoundDisabled) {
879-
SoundManager.playTouchSound();
878+
this._playTouchSound();
880879
}
881880
this.touchableHandlePress(e);
882881
}
@@ -886,6 +885,10 @@ const TouchableMixin = {
886885
this.touchableDelayTimeout = null;
887886
},
888887

888+
_playTouchSound: function() {
889+
UIManager.playTouchSound();
890+
},
891+
889892
_startHighlight: function(e: PressEvent) {
890893
this._savePressInLocation(e);
891894
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);

0 commit comments

Comments
 (0)