Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE REQUEST] Show same remove dialog for every kind of file or folder #4404

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

Aitorbp
Copy link
Contributor

@Aitorbp Aitorbp commented May 13, 2024

Related Issues

App: #4377

  • 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)

QA

@Aitorbp Aitorbp self-assigned this May 13, 2024
@Aitorbp Aitorbp force-pushed the feature/show_same_remove_dialog_for_every_file_folder branch from 6bef5ff to 98f3ddf Compare May 13, 2024 13:21
@Aitorbp Aitorbp linked an issue May 14, 2024 that may be closed by this pull request
10 tasks
@Aitorbp Aitorbp force-pushed the feature/show_same_remove_dialog_for_every_file_folder branch from 5f9c0e0 to 0b29948 Compare May 14, 2024 14:57
@Aitorbp Aitorbp requested a review from JuancaG05 May 14, 2024 16: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.

Some changes here

Comment on lines +1154 to +1155
filesToRemove = checkedFiles
fileOperationsViewModel.showRemoveDialog(filesToRemove)
Copy link
Collaborator

Choose a reason for hiding this comment

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

It can be used checkedFiles on showRemoveDialog instead of having a variable called filesToRemove

Copy link
Contributor Author

@Aitorbp Aitorbp May 30, 2024

Choose a reason for hiding this comment

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

We cannot delete this variable because it is used in the flow. We would have to change the name there too. I think it's better to leave it like this.

Comment on lines +82 to +83
val file = targetFiles.first()
messageArguments = file.fileName
Copy link
Collaborator

Choose a reason for hiding this comment

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

We can delete file variable and use files.first().fileName on the value of messageArguments

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In this case I would leave it with my approach. If you notice, the file variable is later used to know if the file is a folder, therefore we cannot do without it.
Here the code:

val file = targetFiles.first()
                messageArguments = file.fileName
                if (file.isFolder) {
                    R.string.confirmation_remove_folder_alert
                } else {
                    R.string.confirmation_remove_file_alert
                }

@@ -760,6 +760,8 @@
<string name="release_notes_4_3_0_subtitle_accessibility_improvements">Some improvements to make the application more accessible</string>
<string name="release_notes_4_3_0_title_show_app_provider_icon_from_endpoint">New icons in "Open in (web)" option on the operations menu</string>
<string name="release_notes_4_3_0_subtitle_show_app_provider_icon_from_endpoint">More appropriate icons have been added to the "Open in (web)" option on the operations menu</string>
<string name="release_notes_4_3_0_title_show_same_remove_dialog_for_every_file_folder">Improved thumbnails in the delete files dialog</string>
<string name="release_notes_4_3_0_subtitle_show_same_remove_dialog_for_every_file_folder">Thumbnails have been added in remove dialog for all files and not only for images</string>
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
<string name="release_notes_4_3_0_subtitle_show_same_remove_dialog_for_every_file_folder">Thumbnails have been added in remove dialog for all files and not only for images</string>
<string name="release_notes_4_3_0_subtitle_show_same_remove_dialog_for_every_file_folder">Thumbnails have been added in remove dialog for all files and not only for items which had thumbnail</string>

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

Comment on lines 3 to 4
The logic of the custom remove files dialog has been incorporated into the RemoveFilesDialogFragment, unifying both developments.
Thumbnails have been added for all files and not only for images.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
The logic of the custom remove files dialog has been incorporated into the RemoveFilesDialogFragment, unifying both developments.
Thumbnails have been added for all files and not only for images.
The logic of the custom remove files dialog has been incorporated into the RemoveFilesDialogFragment, unifying both developments.
Thumbnails have been added for all files and not only for items which had thumbnail.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated

@Aitorbp Aitorbp force-pushed the feature/show_same_remove_dialog_for_every_file_folder branch 3 times, most recently from 1a7a7b2 to ab533f6 Compare June 4, 2024 07:06
@Aitorbp Aitorbp force-pushed the feature/show_same_remove_dialog_for_every_file_folder branch from 72c28ff to bf7df0e Compare June 4, 2024 07:25
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.

[FEATURE REQUEST] Show same remove dialog for every kind of file or folder
2 participants