mirror of
https://github.com/nextcloud/android.git
synced 2024-12-18 06:51:55 +03:00
Fix FileDetailFragment not starting
- opens on specified tab - opens when launched from PreviewImageActivity Signed-off-by: ZetaTom <70907959+ZetaTom@users.noreply.github.com>
This commit is contained in:
parent
f171e0a794
commit
06534d0a23
2 changed files with 8 additions and 7 deletions
|
@ -351,12 +351,13 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// FIXME file detail not opening from Media tab
|
binding.tabLayout.post(() -> {
|
||||||
if (binding != null) {
|
if (binding != null) {
|
||||||
TabLayout.Tab tab = binding.tabLayout.getTabAt(activeTab);
|
TabLayout.Tab tab = binding.tabLayout.getTabAt(activeTab);
|
||||||
if (tab == null) return;
|
if (tab == null) return;
|
||||||
binding.tabLayout.selectTab(tab);
|
tab.select();
|
||||||
}
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -357,7 +357,7 @@ class PreviewImageActivity : FileActivity(), FileFragment.ContainerActivity, OnR
|
||||||
}
|
}
|
||||||
|
|
||||||
startActivity(intent)
|
startActivity(intent)
|
||||||
backToDisplayActivity()
|
finish()
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun showDetails(file: OCFile, activeTab: Int) {
|
override fun showDetails(file: OCFile, activeTab: Int) {
|
||||||
|
|
Loading…
Reference in a new issue