Skip to content

Commit b4fc3a4

Browse files
committed
Move initPlatform call to onRender in WebUIActivity
The initPlatform(userPrefs) call was moved from onCreate to onRender to ensure platform initialization occurs at the correct lifecycle stage. This change may help with proper setup before rendering.
1 parent e5eba54 commit b4fc3a4

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

app/src/main/java/com/dergoogler/mmrl/wx/ui/activity/webui/WebUIActivity.kt

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,12 +44,8 @@ class WebUIActivity : WXActivity() {
4444
return "WebUI X/$mmrlVersion (Linux; Android $osVersion; $deviceModel; $platform/$platformVersion)"
4545
}
4646

47-
override fun onCreate(savedInstanceState: Bundle?) {
48-
initPlatform(userPrefs)
49-
super.onCreate(savedInstanceState)
50-
}
51-
5247
override fun onRender(savedInstanceState: Bundle?) {
48+
initPlatform(userPrefs)
5349
super.onRender(savedInstanceState)
5450

5551
val modId = this.modId ?: throw BrickException("modId cannot be null or empty")

0 commit comments

Comments
 (0)