Skip to content
Snippets Groups Projects
Commit 1b7bdc7a authored by Adrien Béraud's avatar Adrien Béraud
Browse files

home: check for account uri

Change-Id: I3369aa7d078eb659a5a511947bdef12e17f8cb80
parent 00016c0d
No related branches found
No related tags found
No related merge requests found
...@@ -587,13 +587,14 @@ class HomeFragment: BaseSupportFragment<HomePresenter, HomeView>(), ...@@ -587,13 +587,14 @@ class HomeFragment: BaseSupportFragment<HomePresenter, HomeView>(),
private fun goToQRFragment() { private fun goToQRFragment() {
// Hide keyboard to prevent any glitch. // Hide keyboard to prevent any glitch.
val accountUri = mAccountService.currentAccount?.uri ?: return
(requireContext().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager) (requireContext().getSystemService(Context.INPUT_METHOD_SERVICE) as InputMethodManager)
.hideSoftInputFromWindow(requireView().windowToken, 0) .hideSoftInputFromWindow(requireView().windowToken, 0)
QRCodeFragment.newInstance( QRCodeFragment.newInstance(
QRCodeFragment.MODE_SHARE or QRCodeFragment.MODE_SCAN, QRCodeFragment.MODE_SHARE or QRCodeFragment.MODE_SCAN,
QRCodeFragment.MODE_SCAN, QRCodeFragment.MODE_SCAN,
Uri.fromString(mAccountService.currentAccount?.uri!!) Uri.fromString(accountUri)
).show(parentFragmentManager, QRCodeFragment.TAG) ).show(parentFragmentManager, QRCodeFragment.TAG)
collapseSearchActionView() collapseSearchActionView()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment