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
parent f171e0a794
commit 06534d0a23
No known key found for this signature in database
GPG key ID: BC815CEC88F62FBA
2 changed files with 8 additions and 7 deletions

View file

@ -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) {
TabLayout.Tab tab = binding.tabLayout.getTabAt(activeTab);
if (tab == null) return;
binding.tabLayout.selectTab(tab);
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) {