Skip to content

[stable32] fix: preserve selected nodeid#6329

Merged
vitormattos merged 3 commits into
stable32from
backport/6327/stable32
Jan 5, 2026
Merged

[stable32] fix: preserve selected nodeid#6329
vitormattos merged 3 commits into
stable32from
backport/6327/stable32

Conversation

@backportbot-libresign
Copy link
Copy Markdown

Backport of PR #6327

…ifier

Fix issue where selectedNodeId was being reset to 0 when addFile()
called getAllFiles(). The getAllFiles method resets selectedNodeId
when the file doesn't exist in the store yet, causing problems when
adding new files from the Nextcloud Files app.

Also update payload logic in saveWithVisibleElements and
updateSignatureRequest to send either fileId (for existing
LibreSign files) or nodeId (for new Nextcloud files) based on
whether file.id exists.

This ensures the backend receives the correct identifier type
for each scenario.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Convert addFile() calls to await to ensure proper async handling
when adding files from the Nextcloud Files app sidebar.

This prevents race conditions where selectFile() might be called
before the file is fully added to the store.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
Convert initFromState() to async and await addFile() call to
ensure proper initialization when loading file state.

This maintains consistency with other addFile usage throughout
the codebase.

Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
@github-project-automation github-project-automation Bot moved this to 0. Needs triage in Roadmap Jan 5, 2026
@backportbot-libresign backportbot-libresign Bot added this to the Next Patch (32) milestone Jan 5, 2026
@vitormattos vitormattos merged commit 43957cd into stable32 Jan 5, 2026
56 checks passed
@vitormattos vitormattos deleted the backport/6327/stable32 branch January 5, 2026 22:51
@github-project-automation github-project-automation Bot moved this from 0. Needs triage to 4. to release in Roadmap Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant