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:configChanges="orientation|keyboardHidden|screenSize"
|
||||||
android:exported="true"
|
android:exported="true"
|
||||||
android:label="@string/app_name"
|
android:label="@string/app_name"
|
||||||
android:launchMode="singleTop"
|
android:launchMode="singleInstance"
|
||||||
android:theme="@style/KiwixTheme.Launcher"
|
android:theme="@style/KiwixTheme.Launcher"
|
||||||
android:windowSoftInputMode="adjustPan">
|
android:windowSoftInputMode="adjustPan">
|
||||||
|
|
||||||
|
@ -117,9 +117,6 @@ class KiwixMainActivity : CoreMainActivity() {
|
|||||||
super.onCreate(savedInstanceState)
|
super.onCreate(savedInstanceState)
|
||||||
activityKiwixMainBinding = ActivityKiwixMainBinding.inflate(layoutInflater)
|
activityKiwixMainBinding = ActivityKiwixMainBinding.inflate(layoutInflater)
|
||||||
setContentView(activityKiwixMainBinding.root)
|
setContentView(activityKiwixMainBinding.root)
|
||||||
if (intent.action == "GET_CONTENT") {
|
|
||||||
navigate(R.id.downloadsFragment)
|
|
||||||
}
|
|
||||||
|
|
||||||
navController.addOnDestinationChangedListener(finishActionModeOnDestinationChange)
|
navController.addOnDestinationChangedListener(finishActionModeOnDestinationChange)
|
||||||
activityKiwixMainBinding.drawerNavView.setupWithNavController(navController)
|
activityKiwixMainBinding.drawerNavView.setupWithNavController(navController)
|
||||||
@ -130,6 +127,7 @@ class KiwixMainActivity : CoreMainActivity() {
|
|||||||
activityKiwixMainBinding.bottomNavView.setupWithNavController(navController)
|
activityKiwixMainBinding.bottomNavView.setupWithNavController(navController)
|
||||||
migrateInternalToPublicAppDirectory()
|
migrateInternalToPublicAppDirectory()
|
||||||
handleZimFileIntent(intent)
|
handleZimFileIntent(intent)
|
||||||
|
handleGetContentIntent(intent)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun migrateInternalToPublicAppDirectory() {
|
private fun migrateInternalToPublicAppDirectory() {
|
||||||
@ -220,11 +218,18 @@ class KiwixMainActivity : CoreMainActivity() {
|
|||||||
super.onNewIntent(intent)
|
super.onNewIntent(intent)
|
||||||
handleNotificationIntent(intent)
|
handleNotificationIntent(intent)
|
||||||
handleZimFileIntent(intent)
|
handleZimFileIntent(intent)
|
||||||
|
handleGetContentIntent(intent)
|
||||||
supportFragmentManager.fragments.filterIsInstance<FragmentActivityExtensions>().forEach {
|
supportFragmentManager.fragments.filterIsInstance<FragmentActivityExtensions>().forEach {
|
||||||
it.onNewIntent(intent, this)
|
it.onNewIntent(intent, this)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private fun handleGetContentIntent(intent: Intent?) {
|
||||||
|
if (intent?.action == ACTION_GET_CONTENT) {
|
||||||
|
navigate(R.id.downloadsFragment)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private fun handleZimFileIntent(intent: Intent?) {
|
private fun handleZimFileIntent(intent: Intent?) {
|
||||||
intent?.data?.let {
|
intent?.data?.let {
|
||||||
when (it.scheme) {
|
when (it.scheme) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user