Skip to content

fix: Wrong folder issue#2048

Open
NicolasBourdin88 wants to merge 5 commits into
mainfrom
fix-wrong-folder-issue
Open

fix: Wrong folder issue#2048
NicolasBourdin88 wants to merge 5 commits into
mainfrom
fix-wrong-folder-issue

Conversation

@NicolasBourdin88

Copy link
Copy Markdown
Contributor

No description provided.

@NicolasBourdin88 NicolasBourdin88 requested a review from LunarX June 30, 2026 13:10
@NicolasBourdin88 NicolasBourdin88 self-assigned this Jun 30, 2026
Copilot AI review requested due to automatic review settings June 30, 2026 13:10

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes incorrect “current folder” state propagation by improving how the currently-loaded folder is refreshed/cancelled and by making the Add File bottom sheet react to folder changes instead of snapshotting once.

Changes:

  • Update MainViewModel.loadCurrentFolder to cancel/replace in-flight current-folder loads.
  • Adjust SharedWithMeFragment to load the correct folder ID for root vs non-root shared views.
  • Rework AddFileBottomSheetDialog to observe current-folder LiveData and update UI accordingly.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
app/src/main/java/com/infomaniak/drive/ui/menu/SharedWithMeFragment.kt Loads current folder using SharedWithMe root ID when applicable.
app/src/main/java/com/infomaniak/drive/ui/MainViewModel.kt Refactors current-folder loading/cancellation behavior.
app/src/main/java/com/infomaniak/drive/ui/addFiles/AddFileBottomSheetDialog.kt Observes current folder to avoid using a stale folder when opening the bottom sheet.

Comment thread app/src/main/java/com/infomaniak/drive/ui/MainViewModel.kt

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

Comment thread app/src/main/java/com/infomaniak/drive/ui/MainViewModel.kt
Comment thread app/src/main/java/com/infomaniak/drive/ui/MainViewModel.kt Outdated
Comment thread app/src/main/java/com/infomaniak/drive/views/FileInfoActionsView.kt Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread app/src/main/java/com/infomaniak/drive/ui/MainViewModel.kt

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.

Comment thread app/src/main/java/com/infomaniak/drive/ui/MainViewModel.kt
@NicolasBourdin88 NicolasBourdin88 force-pushed the fix-wrong-folder-issue branch from ca0ea0c to 69baf8b Compare July 6, 2026 08:29
@NicolasBourdin88 NicolasBourdin88 force-pushed the fix-wrong-folder-issue branch from 69baf8b to ec8ee1b Compare July 9, 2026 07:28
@sonarqubecloud

sonarqubecloud Bot commented Jul 9, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants