craft-native 0.0.223 → 0.0.224
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -92,6 +92,7 @@ import android.widget.Switch
|
|
|
92
92
|
import android.widget.TextView
|
|
93
93
|
import android.widget.MediaController
|
|
94
94
|
import android.widget.VideoView
|
|
95
|
+
import androidx.activity.OnBackPressedCallback
|
|
95
96
|
import androidx.appcompat.app.AppCompatActivity
|
|
96
97
|
import androidx.appcompat.app.AppCompatDelegate
|
|
97
98
|
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
|
|
@@ -3826,6 +3827,9 @@ class MainActivity : AppCompatActivity() {
|
|
|
3826
3827
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
3827
3828
|
applyConfiguredAppearance()
|
|
3828
3829
|
super.onCreate(savedInstanceState)
|
|
3830
|
+
onBackPressedDispatcher.addCallback(this, object : OnBackPressedCallback(true) {
|
|
3831
|
+
override fun handleOnBackPressed() = handleNativeBack()
|
|
3832
|
+
})
|
|
3829
3833
|
initialDeepLink = savedInstanceState?.getString("craft.initialDeepLink")?.let(Uri::parse) ?: intent?.data
|
|
3830
3834
|
initialDeepLinkClaimed = savedInstanceState?.getBoolean("craft.initialDeepLinkClaimed", false) ?: false
|
|
3831
3835
|
deliveredInitialDeepLink = savedInstanceState?.getBoolean("craft.deliveredInitialDeepLink", false) ?: false
|
|
@@ -3987,8 +3991,7 @@ class MainActivity : AppCompatActivity() {
|
|
|
3987
3991
|
}
|
|
3988
3992
|
|
|
3989
3993
|
private fun onBackPressedDispatcherCompat() {
|
|
3990
|
-
|
|
3991
|
-
onBackPressed()
|
|
3994
|
+
onBackPressedDispatcher.onBackPressed()
|
|
3992
3995
|
}
|
|
3993
3996
|
|
|
3994
3997
|
private fun haptic() {
|
|
@@ -7286,7 +7289,9 @@ class MainActivity : AppCompatActivity() {
|
|
|
7286
7289
|
}
|
|
7287
7290
|
|
|
7288
7291
|
@Deprecated("Uses the activity back callback for native route navigation")
|
|
7289
|
-
override fun onBackPressed()
|
|
7292
|
+
override fun onBackPressed() = handleNativeBack()
|
|
7293
|
+
|
|
7294
|
+
private fun handleNativeBack() {
|
|
7290
7295
|
val screen = screens.lastOrNull() ?: return back()
|
|
7291
7296
|
val modal = screen.modalVisibility.entries.lastOrNull { (view, visible) -> visible && view.visibility == View.VISIBLE }
|
|
7292
7297
|
if (modal != null) {
|
package/dist/cli.js
CHANGED
|
@@ -3424,7 +3424,7 @@ function pinCraftNativeDependency(packagePath, craftVersion) {
|
|
|
3424
3424
|
`);
|
|
3425
3425
|
}
|
|
3426
3426
|
// package.json
|
|
3427
|
-
var version = "0.0.
|
|
3427
|
+
var version = "0.0.224";
|
|
3428
3428
|
|
|
3429
3429
|
// bin/cli.ts
|
|
3430
3430
|
var spawnedFrom = process6.env[CRAFT_CLI_SPAWN_MARKER];
|
package/dist/index.cjs
CHANGED
package/dist/index.js
CHANGED