Skip to content

Commit 326655d

Browse files
author
Luke Brandon Farrell
authored
fix: merge pull request #92 from filipef101/master
fix: update rn types and type fix plus upstream lib compilation change
2 parents 885ca7d + b0c80c4 commit 326655d

File tree

4 files changed

+17376
-44
lines changed

4 files changed

+17376
-44
lines changed

lib/RNNDrawer.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ var RNNDrawer = /** @class */ (function () {
220220
/** Props */
221221
var _a = this.props, direction = _a.direction, fadeOpacity = _a.fadeOpacity;
222222
// Adapt the drawer's size on orientation change
223-
react_native_1.Dimensions.addEventListener('change', this.onOrientationChange);
223+
this.orientationChangeListener = react_native_1.Dimensions.addEventListener('change', this.onOrientationChange);
224224
// Executes when the side of the screen interaction starts
225225
this.unsubscribeSwipeStart = events_1.listen('SWIPE_START', function (value) {
226226
_this.panningStartedPoint.moveX = value.moveX;
@@ -326,7 +326,8 @@ var RNNDrawer = /** @class */ (function () {
326326
* Removes all the listenrs from this component
327327
*/
328328
WrappedDrawer.prototype.removeListeners = function () {
329-
react_native_1.Dimensions.removeEventListener('change', this.onOrientationChange);
329+
if (this.orientationChangeListener)
330+
this.orientationChangeListener.remove();
330331
if (this.unsubscribeSwipeStart)
331332
this.unsubscribeSwipeStart();
332333
if (this.unsubscribeSwipeMove)

0 commit comments

Comments
 (0)