Skip to content

Commit

Permalink
feat: use Dock Progress
Browse files Browse the repository at this point in the history
  • Loading branch information
EETagent committed Feb 3, 2024
1 parent d4410b0 commit 61b2aff
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Send/Controllers/UploadViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#import <Send_Library/Send.h>

#import "../DockProgress/DockProgress.h"

@implementation UploadViewController {
Send *send;
File *file;
Expand Down Expand Up @@ -86,8 +88,13 @@ - (void)sendUploadStartedWithSize:(NSUInteger)size {
- (void)sendUploadProgressWithTotalBytesUploaded:(NSUInteger)bytes {
// Update progress
dispatch_async(dispatch_get_main_queue(), ^{
double percent = bytes / [[self progressIndicator] maxValue];

[DockProgress setProgress:percent];

[[self progressIndicator] setDoubleValue:bytes];
});

}

- (void)sendUploadCompleted {
Expand Down

0 comments on commit 61b2aff

Please sign in to comment.