fix(shares): fix outgoing shares when browsing in files, fix shareBadge action to open shareDialog

This commit is contained in:
Edouard Vanbelle
2026-05-29 14:06:28 +02:00
parent eef67973b3
commit 615657a7be
4 changed files with 53 additions and 9 deletions
+6 -3
View File
@@ -529,6 +529,12 @@ function initApp() {
window.addEventListener('authenticationDone', async () => {
// Check if a context was provided in the URL
const hashContext = deserializeHash();
// Always fetch grants so shared badges are correct regardless of the
// initial section. Fire in the background — don't block section init.
grants.fetchIncomingGrants();
grants.fetchOutgoingGrants();
switchSectionTo(hashContext.section);
if (hashContext.section === 'files') {
if (hashContext.path) {
@@ -540,9 +546,6 @@ function initApp() {
app.viewFile = hashContext.file;
}
// get grants (xxx: async methods)
await grants.fetchIncomingGrants();
await grants.fetchOutgoingGrants();
loadFiles();
}
});