Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions lib/RNNDrawer.js
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ var RNNDrawer = /** @class */ (function () {
/** Props */
var _a = this.props, direction = _a.direction, fadeOpacity = _a.fadeOpacity;
// Adapt the drawer's size on orientation change
react_native_1.Dimensions.addEventListener('change', this.onOrientationChange);
this.orientationChangeListener = react_native_1.Dimensions.addEventListener('change', this.onOrientationChange);
// Executes when the side of the screen interaction starts
this.unsubscribeSwipeStart = events_1.listen('SWIPE_START', function (value) {
_this.panningStartedPoint.moveX = value.moveX;
Expand Down Expand Up @@ -326,7 +326,8 @@ var RNNDrawer = /** @class */ (function () {
* Removes all the listenrs from this component
*/
WrappedDrawer.prototype.removeListeners = function () {
react_native_1.Dimensions.removeEventListener('change', this.onOrientationChange);
if (this.orientationChangeListener)
this.orientationChangeListener.remove();
if (this.unsubscribeSwipeStart)
this.unsubscribeSwipeStart();
if (this.unsubscribeSwipeMove)
Expand Down
Loading