Use SoundManager in Pressability and Touchable
Summary: This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound() Previously landed and unladed: D16543433 Changelog: This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound() Reviewed By: makovkastar Differential Revision: D17926309 fbshipit-source-id: ff7e318a4d720e489cbfe60e8d72ebb749c11c18
This commit is contained in:
Родитель
87b94e60a6
Коммит
ff03698f20
|
@ -19,6 +19,7 @@ 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');
|
||||
|
@ -866,7 +867,7 @@ const TouchableMixin = {
|
|||
this._endHighlight(e);
|
||||
}
|
||||
if (Platform.OS === 'android' && !this.props.touchSoundDisabled) {
|
||||
this._playTouchSound();
|
||||
SoundManager.playTouchSound();
|
||||
}
|
||||
this.touchableHandlePress(e);
|
||||
}
|
||||
|
@ -876,10 +877,6 @@ const TouchableMixin = {
|
|||
this.touchableDelayTimeout = null;
|
||||
},
|
||||
|
||||
_playTouchSound: function() {
|
||||
UIManager.playTouchSound();
|
||||
},
|
||||
|
||||
_startHighlight: function(e: PressEvent) {
|
||||
this._savePressInLocation(e);
|
||||
this.touchableHandleActivePressIn && this.touchableHandleActivePressIn(e);
|
||||
|
|
Загрузка…
Ссылка в новой задаче