Skip to content

[FIX] Option "Copy here" in spaces list after rotating device#4786

Open
mykh-hailo wants to merge 2 commits intoowncloud:masterfrom
mykh-hailo:fix/copy-button-visibility-on-rotation
Open

[FIX] Option "Copy here" in spaces list after rotating device#4786
mykh-hailo wants to merge 2 commits intoowncloud:masterfrom
mykh-hailo:fix/copy-button-visibility-on-rotation

Conversation

@mykh-hailo
Copy link
Contributor

Related Issues

App: #4718

  • Add changelog files for the fixed issues in folder changelog/unreleased. More info here
  • Add feature to Release Notes in ReleaseNotesViewModel.kt creating a new ReleaseNote() with String resources (if required)

@mykh-hailo mykh-hailo changed the title fix "Copy here" button visibility after rotation in folder picker [FIX] "Copy here" button visibility after rotation in folder picker Feb 27, 2026
@joragua joragua linked an issue Mar 2, 2026 that may be closed by this pull request
@mykh-hailo mykh-hailo force-pushed the fix/copy-button-visibility-on-rotation branch from 65bc123 to 0f42dd5 Compare March 2, 2026 13:15
@joragua joragua changed the title [FIX] "Copy here" button visibility after rotation in folder picker [FIX] Option "Copy here" in spaces list after rotating device Mar 3, 2026
@mykh-hailo mykh-hailo force-pushed the fix/copy-button-visibility-on-rotation branch from 1c3d9a3 to 174f286 Compare March 3, 2026 15:21
@mykh-hailo
Copy link
Contributor Author

@joragua Can you check this PR please?

@joragua joragua self-requested a review March 3, 2026 17:04
Copy link
Collaborator

@joragua joragua left a comment

Choose a reason for hiding this comment

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

Somme comments here @mykh-hailo! 🙌🏻

NOTE: We usually create the branches using underscores between words. In this case, the name of the branch would be: fix/copy_button_visibility_on_rotation (just for you to know) Do not remove the branch but just keep it in mind for future PRs 😄

@mykh-hailo
Copy link
Contributor Author

Thank you for your comment @joragua
I will fix for your comments asap.
Thank you.

@mykh-hailo mykh-hailo force-pushed the fix/copy-button-visibility-on-rotation branch from 174f286 to 1f7a3b2 Compare March 4, 2026 14:27
@mykh-hailo
Copy link
Contributor Author

@joragua I implemented much easier solution for this issue.
Please check and let me know if you have any comments.
Thank you.

@joragua joragua self-requested a review March 4, 2026 15:17
Copy link
Collaborator

@joragua joragua left a comment

Choose a reason for hiding this comment

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

@mykh-hailo Just one more comment and it's ready to go!

@mykh-hailo mykh-hailo force-pushed the fix/copy-button-visibility-on-rotation branch from 1f7a3b2 to daef709 Compare March 4, 2026 17:29
@mykh-hailo
Copy link
Contributor Author

@joragua I made a quick fix on your comment.
I'd appreciate it if you check this again.
Thank you.

@joragua joragua self-requested a review March 5, 2026 07:51
Copy link
Collaborator

@joragua joragua left a comment

Choose a reason for hiding this comment

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

Good job! 💯 Let's move it to QA

@jesmrec
Copy link
Collaborator

jesmrec commented Mar 5, 2026

@mykh-hailo Unfortunately the fix it's no valid. It fixes the problem with the Copy but breaks the Move.

Check the following steps out:

  1. In the list of files, select any item to Move -> List of files displayed (not spaces list, since it's not allowed to move items through spaces), with Move here and Cancel options available.
  2. Rotate the device

Move here is gone (it shouldn't) and only Cancel is available.

It's verified that the current master branch shows the correct behaviour for the Move, therefore the defect comes from this PR.

Could you take a look? anything you need, don't hesitate to ask us!

@joragua
Copy link
Collaborator

joragua commented Mar 5, 2026

After some testing, I've noticed that his bug (#4441) is also reproducible in the folder picker. It’s likely that both issues could be fixed with a single solution. But we will need to check it in QA... 🤔

Here's the other PR (#4467) related to this problem, if it helps @mykh-hailo 🙌🏻

@mykh-hailo
Copy link
Contributor Author

@joragua as far as I checked the code again based on Jesmerc's comment, I think my first approach to call a function to change visibility of that function onResume would be a solution.
What do you think?

@jesmrec
Copy link
Collaborator

jesmrec commented Mar 6, 2026

Then, we have two different approaches:

  1. Modifying the Manifest file adding a property like android:configChanges="orientation|screenSize" , suggested by @joragua

  2. Initial solution suggested by @mykh-hailo

First one intends to fix two problems in one ✅ , but, Manifest stuff is delicated and will need extra testing, but it is the cleanest solution IMO (if nothing is broken, for sure).

Second one seems to be totally safe ✅ , but more code to achieve the same target.

@mykh-hailo @joragua do you have any extra input? pros and cons of every solution? let's make it constructive 😄

@jesmrec
Copy link
Collaborator

jesmrec commented Mar 6, 2026

OTOH, just as a comment, @mykh-hailo we use to write branch names with underscores (check GUIDELINES), so, the repo will be tidy and uniform around ;) . Take it in account for future PRs, thanks!!

@joragua
Copy link
Collaborator

joragua commented Mar 6, 2026

This is my opinion:

Approaches Pros Cons
android:configChanges="orientation|screenSize" Could fix two different bugs at the same time related to the folder picker. Cleaner solution in terms of logic, fewer lines of code, and better readability. Requires more testing to ensure it doesn’t break the folder picker since Manifest is delicated as mentioned
@mykh-hailo solution Could fix the bug related to the "Copy here" option. Another fix is still needed for the filter in the folder picker (the same as the other approach? redundant code?). Results in more code and more lines.

@mykh-hailo
Copy link
Contributor Author

@joragua as far as I checked the code the filtering issue is caused because my branch was not up-to-date.

@joragua
Copy link
Collaborator

joragua commented Mar 9, 2026

Hmm... 🤔 I don't think so, since I can reproduce the filter bug on the master branch. Can you confirm this @jesmrec?

@jesmrec
Copy link
Collaborator

jesmrec commented Mar 9, 2026

The problem about filtering that @joragua reported is reproducible in master , and also visible in the stable version. That means, it's not a matter of your branch @mykh-hailo.

That also means, if you'd wish you can fix it together with the initial bug (both problems with one fix would be cool), but, as a regression problem, it could be addressed separately. Up 2 you ;)

@mykh-hailo
Copy link
Contributor Author

@jesmrec Let me fix the both issues together.

@mykh-hailo mykh-hailo force-pushed the fix/copy-button-visibility-on-rotation branch from daef709 to 06911e4 Compare March 9, 2026 17:28
@mykh-hailo
Copy link
Contributor Author

@jesmrec Can you check my updates again?
one fix for 2 issues.

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.

[BUG] Option "Copy here" in spaces list after rotating device

3 participants