[go: up one dir, main page]

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

Don't download file again if it's already downloaded (#141) #145

Merged
merged 25 commits into from
Oct 27, 2022

Conversation

krida2000
Copy link
Contributor
@krida2000 krida2000 commented Sep 19, 2022

Resolves #141

Synopsis

Метод PlatformUtils.download не сравнивает размеры файлов, имеющих одинаковое название, и просто дописывает (2), (3) и так далее файлу при загрузке.

Solution

Нужно добавить проверку на то скачан ли файл перед его скачиванием.

Checklist

  • Created PR:
    • In draft mode
    • Name contains issue reference
    • Has type and k:: labels applied
  • Before review:
    • Documentation is updated (if required)
    • Tests are updated (if required)
    • Changes conform code style
    • CHANGELOG entry is added (if required)
    • FCM (final commit message) is posted or updated
    • Draft mode is removed
  • Review is completed and changes are approved
    • FCM (final commit message) is approved
  • Before merge:
    • Milestone is set
    • PR's name and description are correct and up-to-date
    • All temporary labels are removed

@krida2000 krida2000 added enhancement Improvement of existing features or bugfix k::UI/UX UI (user interface) and UX (user experience) changes k::refactor Refactor changes of existing code labels Sep 19, 2022
@krida2000 krida2000 added this to the 0.1.0-alpha.6 milestone Sep 19, 2022
@krida2000 krida2000 self-assigned this Sep 19, 2022
@krida2000 krida2000 changed the title Don't download file again if it's already downloaded Don't download file again if it's already downloaded (#141) Sep 19, 2022
@krida2000
Copy link
Contributor Author
krida2000 commented Sep 20, 2022

FCM

Fix `PlatformUtils.download` downloading existing files (#145, #141)

Additionally:
- add `StorageFile.url` getter
- change default `Config.downloads` to ``

@krida2000 krida2000 marked this pull request as ready for review September 20, 2022 07:14
Copy link
Contributor
@SleepySquash SleepySquash left a comment

Choose a reason for hiding this comment

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

@krida2000, обновите, пожалуйста, до последнего мейна.

@SleepySquash SleepySquash marked this pull request as draft September 29, 2022 09:28
lib/util/web/web.dart Outdated Show resolved Hide resolved
@krida2000 krida2000 marked this pull request as ready for review October 3, 2022 10:02
Copy link
Contributor
@SleepySquash SleepySquash left a comment

Choose a reason for hiding this comment

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

lib/domain/model/file.dart Outdated Show resolved Hide resolved
lib/util/platform_utils.dart Outdated Show resolved Hide resolved
lib/util/platform_utils.dart Outdated Show resolved Hide resolved
@SleepySquash SleepySquash marked this pull request as draft October 12, 2022 11:55
@SleepySquash SleepySquash marked this pull request as ready for review October 14, 2022 13:29
@SleepySquash SleepySquash marked this pull request as draft October 20, 2022 13:21
@SleepySquash SleepySquash marked this pull request as ready for review October 21, 2022 10:27
Copy link
Contributor
@SleepySquash SleepySquash left a comment

Choose a reason for hiding this comment

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

@krida2000, отписал о небольшом баге - посмотрите, пожалуйста, воспроизводится ли у Вас. Если это я что-то сломал, то искренне прошу прощения! В остальном всё LGTM 👍

lib/util/platform_utils.dart Outdated Show resolved Hide resolved
lib/util/platform_utils.dart Outdated Show resolved Hide resolved
lib/domain/model/attachment.dart Show resolved Hide resolved
@SleepySquash SleepySquash enabled auto-merge (squash) October 27, 2022 10:10
@SleepySquash SleepySquash merged commit 4a5a7e9 into main Oct 27, 2022
@SleepySquash SleepySquash deleted the 141-check-downloaded-before-download branch October 27, 2022 10:35
github-actions bot added a commit that referenced this pull request Oct 27, 2022
Additionally:
- add `StorageFile.url` getter
- change default `Config.downloads` to ``

Co-authored-by: SleepySquash <nordnikita@icloud.com> 4a5a7e9
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement of existing features or bugfix k::refactor Refactor changes of existing code k::UI/UX UI (user interface) and UX (user experience) changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Don't download file again if it's already downloaded
2 participants