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:
ZetaTom 2024-11-19 11:36:13 +01:00 committed by Alper Öztürk
parent 329f113d75
commit 49ee19d785
2 changed files with 8 additions and 7 deletions

View file

@ -352,12 +352,13 @@ public class FileDetailFragment extends FileFragment implements OnClickListener,
}
});
// FIXME file detail not opening from Media tab
if (binding != null) {
TabLayout.Tab tab = binding.tabLayout.getTabAt(activeTab);
if (tab == null) return;
binding.tabLayout.selectTab(tab);
}
binding.tabLayout.post(() -> {
if (binding != null) {
TabLayout.Tab tab = binding.tabLayout.getTabAt(activeTab);
if (tab == null) return;
tab.select();
}
});
}
@Override

View file

@ -357,7 +357,7 @@ class PreviewImageActivity : FileActivity(), FileFragment.ContainerActivity, OnR
}
startActivity(intent)
backToDisplayActivity()
finish()
}
override fun showDetails(file: OCFile, activeTab: Int) {