-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
127 changed files
with
7,614 additions
and
2,209 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
|
||
@interface MEGATransferList (MNZCategory) | ||
|
||
- (NSArray *)mnz_transfersArrayFromTranferList; | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
#import "MEGATransferList+MNZCategory.h" | ||
|
||
@implementation MEGATransferList (MNZCategory) | ||
|
||
- (NSArray *)mnz_transfersArrayFromTranferList { | ||
NSUInteger transferListCount = self.size.unsignedIntegerValue; | ||
NSMutableArray *transfersMutableArray = [[NSMutableArray alloc] initWithCapacity:transferListCount]; | ||
for (NSUInteger i = 0; i < transferListCount; i++) { | ||
MEGATransfer *transfer = [self transferAtIndex:i]; | ||
[transfersMutableArray addObject:transfer]; | ||
} | ||
|
||
return transfersMutableArray; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
|
||
NS_ASSUME_NONNULL_BEGIN | ||
|
||
@interface MEGAUserAlertList (MNZCategory) | ||
|
||
@property (nonatomic, readonly) NSArray<MEGAUserAlert *> *mnz_userAlertsArray; | ||
@property (nonatomic, readonly) NSUInteger mnz_unseenCount; | ||
|
||
@end | ||
|
||
NS_ASSUME_NONNULL_END |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
|
||
#import "MEGAUserAlertList+MNZCategory.h" | ||
|
||
#import "MEGAUserAlert.h" | ||
|
||
@implementation MEGAUserAlertList (MNZCategory) | ||
|
||
- (NSArray<MEGAUserAlert *> *)mnz_userAlertsArray { | ||
NSInteger userAlertListCount = self.size; | ||
|
||
NSMutableArray<MEGAUserAlert *> *userAlertsArray = [[NSMutableArray<MEGAUserAlert *> alloc] initWithCapacity:userAlertListCount]; | ||
for (NSUInteger i = 0; i < userAlertListCount; i++) { | ||
MEGAUserAlert *userAlert = [self usertAlertAtIndex:i]; | ||
[userAlertsArray insertObject:userAlert atIndex:0]; | ||
} | ||
|
||
return [userAlertsArray copy]; | ||
} | ||
|
||
- (NSUInteger)mnz_unseenCount { | ||
NSUInteger unseenCount = 0; | ||
|
||
NSInteger userAlertListCount = self.size; | ||
for (NSUInteger i = 0; i < userAlertListCount; i++) { | ||
MEGAUserAlert *userAlert = [self usertAlertAtIndex:i]; | ||
if (!userAlert.isSeen) { | ||
unseenCount++; | ||
} | ||
} | ||
|
||
return unseenCount; | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.