Skip to content
This repository was archived by the owner on Aug 13, 2024. It is now read-only.

Commit 42ccb43

Browse files
committed
chore(android): added getter for ui manager module
1 parent 5fd8857 commit 42ccb43

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

android/src/main/java/com/scrollviewenhancer/MaintainVisibleScrollPositionHelper.kt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ class MaintainVisibleScrollPositionHelper(
6565
get() = Assertions.assertNotNull(
6666
UIManagerHelper.getUIManagerForReactTag(mScrollView.context as ReactContext, mScrollView.id)
6767
)
68+
private val uiManagerModule: UIManagerModule?
69+
get() = uiManager as? UIManagerModule
6870

6971
/**
7072
* Start listening to view hierarchy updates. Should be called when this is created.
@@ -74,7 +76,7 @@ class MaintainVisibleScrollPositionHelper(
7476

7577
mListening = true
7678
uiManager.addUIManagerEventListener(this)
77-
(uiManager as? UIManagerModule)?.uiImplementation?.setLayoutUpdateListener(this)
79+
uiManagerModule?.uiImplementation?.setLayoutUpdateListener(this)
7880
}
7981

8082
/**

0 commit comments

Comments
 (0)