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

Progress Bar #22

Merged
merged 4 commits into from
Oct 1, 2022
Merged

Conversation

m9m
Copy link
Contributor

@m9m m9m commented Oct 1, 2022

This is in response to the feature request detailed here, which asks for a Progress Bar to display the download progress to a user instead of the main thread just hanging out there while downloading (since the main thread blocks while downloading).

This PR mainly accomplishes two things:

  1. Add class ProgressBar which operates as a UI thread.
  2. Modify class FileDownloader to use the ProgressBar class, while additionally moving some of the UI code from FileDownloader over to ProgressBar to create a "UI Thread" and a "Main downloader thread" which blocks.

While also adding:

  1. Include no file name in the input to download the default file name.
  2. Pre-determine download size before downloading using a HEAD request for the content-length header.

Feedback I am looking for entails:

  1. How the UI itself looks, found in src/ProgressBarThread.java line 34.
  2. How to correctly wrap this class in src/FileDownloader.java. What I included is on 75-81.
    image

@m9m m9m marked this pull request as ready for review October 1, 2022 12:34
@SaptarshiSarkar12
Copy link
Owner

@m9m Please resolve branch conflicts

Copy link
Owner

@SaptarshiSarkar12 SaptarshiSarkar12 left a comment

Choose a reason for hiding this comment

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

LGTM 👍. Thanks for contributing 🚀🚀

@SaptarshiSarkar12 SaptarshiSarkar12 merged commit ea82fe5 into SaptarshiSarkar12:master Oct 1, 2022
@m9m m9m deleted the progresss-bar-m9m branch October 1, 2022 12:55
@SaptarshiSarkar12 SaptarshiSarkar12 added the hacktoberfest-accepted Accepted Pull Requests for Hacktoberfest label Oct 1, 2022
@m9m m9m changed the title [WIP] Progress Bar Progress Bar Oct 2, 2022
@SaptarshiSarkar12 SaptarshiSarkar12 linked an issue Oct 2, 2022 that may be closed by this pull request
@SaptarshiSarkar12 SaptarshiSarkar12 added feature ✨ New feature request or addition App 💻 Issues/Pull Requests which update Drifty Application Code labels Mar 20, 2023
SaptarshiSarkar12 added a commit that referenced this pull request Jul 6, 2023
SaptarshiSarkar12 added a commit that referenced this pull request Jul 7, 2023
@SaptarshiSarkar12 SaptarshiSarkar12 modified the milestone: Drifty v1.1.0 Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
App 💻 Issues/Pull Requests which update Drifty Application Code feature ✨ New feature request or addition hacktoberfest-accepted Accepted Pull Requests for Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Add progress bar for Drifty
2 participants