Skip to content

Commit

Permalink
fix: merge pull request #92 from filipef101/master
Browse files Browse the repository at this point in the history
fix: update rn types and type fix plus upstream lib compilation change
  • Loading branch information
Luke Brandon Farrell authored Nov 2, 2022
2 parents 885ca7d + b0c80c4 commit 326655d
Show file tree
Hide file tree
Showing 4 changed files with 17,376 additions and 44 deletions.
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

0 comments on commit 326655d

Please sign in to comment.