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

Remove download when html file #11227

Merged
merged 8 commits into from
Apr 29, 2024
Merged

Remove download when html file #11227

merged 8 commits into from
Apr 29, 2024

Conversation

Siedlerchr
Copy link
Member

@Siedlerchr Siedlerchr commented Apr 20, 2024

Fixes #10149

Mandatory checks

  • Change in CHANGELOG.md described in a way that is understandable for the average user (if applicable)
  • Tests created for changes (if applicable)
  • Manually tested changed features in running JabRef (always required)
  • Screenshots added in PR description (for UI changes)
  • Checked developer's documentation: Is the information available and up to date? If not, I outlined it in this pull request.
  • Checked documentation: Is the information available and up to date? If not, I created an issue at https://github.com/JabRef/user-documentation/issues or, even better, I submitted a pull request to the documentation repository.

@Siedlerchr Siedlerchr added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 20, 2024
dialogService.notify(Localization.lang("Download was a HTML file. Not adding it."));
List<LinkedFile> newFiles = new ArrayList<>(entry.getFiles());
newFiles.remove(linkedFile);
entry.setFiles(newFiles);
Copy link
Member

Choose a reason for hiding this comment

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

I am not sure about this one if there are multiple files attached and only one leads to HTML. Need to see the full source.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm only removing the current linked File from he current download.
I am getting all existing files from the entry and just remove the current one
To trigger change detection I have to reassign the list

@koppor
Copy link
Member

koppor commented Apr 24, 2024

This is a hard issue.

Test entry:

@Article{,
  file = {https://github.com/JabRef/jabref/issues/10149},
}

Click on "download File"

image

Then, the whole link is removed:

image


When executing the steps from #10149 (comment), there are two URLs shown in the file dialog:

image

They are removed shortly after.


I am working on a fix.

@koppor koppor removed the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 24, 2024
@koppor
Copy link
Member

koppor commented Apr 24, 2024

Fixed 8398d8e (#11227)

@koppor koppor added the status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers label Apr 24, 2024
@Siedlerchr Siedlerchr added this pull request to the merge queue Apr 29, 2024
Copy link
Contributor

github-actions bot commented Apr 29, 2024

The build for this PR is no longer available. Please visit https://builds.jabref.org/main/ for the latest build.

Merged via the queue into main with commit 9f2418b Apr 29, 2024
24 checks passed
@Siedlerchr Siedlerchr deleted the fixhtmldownload branch April 29, 2024 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: ready-for-review Pull Requests that are ready to be reviewed by the maintainers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Download linked file" option creates an html file instead of downloading the pdf on Windows 10.
2 participants