Fix some issues with launching stuff from shortcuts menu

This commit is contained in:
Mario Danic 2019-12-22 11:59:32 +01:00 committed by Mario Đanić
parent 52f9891939
commit a05f99949c
3 changed files with 8 additions and 9 deletions

View File

@ -82,6 +82,7 @@
<activity
android:name=".activities.MainActivity"
android:label="@string/nc_app_label"
android:launchMode="singleTask"
android:windowSoftInputMode="adjustPan">
<intent-filter>
<action android:name="android.intent.action.MAIN" />

View File

@ -86,7 +86,6 @@ class MainActivity : BaseActivity(), ActionBarProvider {
)
onNewIntent(intent)
}
} else {
runOnUiThread {
@ -97,10 +96,7 @@ class MainActivity : BaseActivity(), ActionBarProvider {
)
}
}
}
} else {
onNewIntent(intent)
}
}
@ -143,7 +139,7 @@ class MainActivity : BaseActivity(), ActionBarProvider {
extras.putParcelable(BundleKeys.KEY_USER_ENTITY, it)
withContext(Dispatchers.Main) {
ConductorRemapping.remapChatController(
router!!, intent.getLongExtra(BundleKeys.KEY_INTERNAL_USER_ID, -1),
router!!, it.id!!,
intent.getStringExtra(BundleKeys.KEY_ROOM_TOKEN)!!, extras, false)
}
}

View File

@ -50,10 +50,12 @@ class GlobalService constructor(usersRepository: UsersRepository,
init {
currentUserLiveData.observeForever { user ->
if (user.id != previousUser?.id) {
cookieManager.cookieStore.removeAll()
//okHttpClient.dispatcher().cancelAll()
currentConversation = null
user?.let {
if (it.id != previousUser?.id) {
cookieManager.cookieStore.removeAll()
//okHttpClient.dispatcher().cancelAll()
currentConversation = null
}
}
}
}