Skip to content

Commit

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

Differential Revision:
D17170140

Original commit changeset: 33a8ca508ec3

fbshipit-source-id: ec7dbded4caf3e9efd61e0c3370c894e8a9c054d
  • Loading branch information
mdvacca authored and facebook-github-bot committed Sep 4, 2019
1 parent e6d5f2e commit 1ee811c
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 @@ -867,7 +866,7 @@ const TouchableMixin = {
this._endHighlight(e);
}
if (Platform.OS === 'android' && !this.props.touchSoundDisabled) {
SoundManager.playTouchSound();
this._playTouchSound();
}
this.touchableHandlePress(e);
}
Expand All @@ -877,6 +876,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 1ee811c

Please sign in to comment.