Skip to content

Commit 955a0ad

Browse files
fix: update key event handling in MainActivity and remove deprecated utility in ProjectLoaderViewModel
- Updated the onKeyUp method in MainActivity to check for null event before processing key events. - Removed the usage of MendixBackwardsCompatUtility in ProjectLoaderViewModel as it is no longer needed. - Updated package-lock.json to reflect dependency updates and version changes across multiple packages.
1 parent af8d673 commit 955a0ad

3 files changed

Lines changed: 165 additions & 159 deletions

File tree

android/app/src/production/java/com/mendix/developerapp/MainActivity.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ class MainActivity : AppCompatActivity(), DefaultHardwareBackBtnHandler, LaunchS
242242
}
243243

244244
override fun onKeyUp(keyCode: Int, event: KeyEvent?): Boolean {
245-
return if ((currentFragment as? MendixReactFragment)?.onKeyUp(
245+
return if (event != null && (currentFragment as? MendixReactFragment)?.onKeyUp(
246246
keyCode,
247247
event
248248
) == true

android/app/src/production/java/com/mendix/developerapp/loading/ProjectLoaderViewModel.kt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ import com.mendix.mendixnative.api.ResponseStatus
1111
import com.mendix.mendixnative.api.RuntimeInfoResponse
1212
import com.mendix.mendixnative.api.getRuntimeInfo
1313
import com.mendix.mendixnative.react.MxConfiguration
14-
import com.mendix.mendixnative.util.MendixBackwardsCompatUtility
1514
import kotlinx.coroutines.flow.MutableStateFlow
1615
import kotlinx.coroutines.flow.StateFlow
1716
import kotlinx.coroutines.flow.asStateFlow
@@ -141,7 +140,6 @@ class ProjectLoaderViewModel : ViewModel() {
141140
ResponseStatus.FAILED -> setStatus(STATUS_ERROR_CONNECTION)
142141
else -> {
143142
val nativeBinaryVersion = runtimeInfoResponse.data!!.nativeBinaryVersion
144-
MendixBackwardsCompatUtility.update(runtimeInfoResponse.data!!.version)
145143
val supportedBinaryVersion = MxConfiguration.NATIVE_BINARY_VERSION
146144
when {
147145
nativeBinaryVersion == supportedBinaryVersion -> {

0 commit comments

Comments
 (0)