mirror of
https://github.com/kiwix/kiwix-android.git
synced 2025-08-03 18:56:44 -04:00
Fixed: Kiwix now opens in the Samsung file navigator.
This commit is contained in:
parent
4c773e27a5
commit
071dc96c9a
@ -28,7 +28,7 @@
|
||||
android:configChanges="orientation|keyboardHidden|screenSize"
|
||||
android:exported="true"
|
||||
android:label="@string/app_name"
|
||||
android:launchMode="singleTop"
|
||||
android:launchMode="singleInstance"
|
||||
android:theme="@style/KiwixTheme.Launcher"
|
||||
android:windowSoftInputMode="adjustPan">
|
||||
|
||||
|
@ -117,9 +117,6 @@ class KiwixMainActivity : CoreMainActivity() {
|
||||
super.onCreate(savedInstanceState)
|
||||
activityKiwixMainBinding = ActivityKiwixMainBinding.inflate(layoutInflater)
|
||||
setContentView(activityKiwixMainBinding.root)
|
||||
if (intent.action == "GET_CONTENT") {
|
||||
navigate(R.id.downloadsFragment)
|
||||
}
|
||||
|
||||
navController.addOnDestinationChangedListener(finishActionModeOnDestinationChange)
|
||||
activityKiwixMainBinding.drawerNavView.setupWithNavController(navController)
|
||||
@ -130,6 +127,7 @@ class KiwixMainActivity : CoreMainActivity() {
|
||||
activityKiwixMainBinding.bottomNavView.setupWithNavController(navController)
|
||||
migrateInternalToPublicAppDirectory()
|
||||
handleZimFileIntent(intent)
|
||||
handleGetContentIntent(intent)
|
||||
}
|
||||
|
||||
private fun migrateInternalToPublicAppDirectory() {
|
||||
@ -220,11 +218,18 @@ class KiwixMainActivity : CoreMainActivity() {
|
||||
super.onNewIntent(intent)
|
||||
handleNotificationIntent(intent)
|
||||
handleZimFileIntent(intent)
|
||||
handleGetContentIntent(intent)
|
||||
supportFragmentManager.fragments.filterIsInstance<FragmentActivityExtensions>().forEach {
|
||||
it.onNewIntent(intent, this)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleGetContentIntent(intent: Intent?) {
|
||||
if (intent?.action == ACTION_GET_CONTENT) {
|
||||
navigate(R.id.downloadsFragment)
|
||||
}
|
||||
}
|
||||
|
||||
private fun handleZimFileIntent(intent: Intent?) {
|
||||
intent?.data?.let {
|
||||
when (it.scheme) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user