-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Only remove account if the account information refresh fails with a 403 or 401 error.
- Loading branch information
香風智乃
authored and
香風智乃
committed
Jan 26, 2019
1 parent
c0d4031
commit ef0bcee
Showing
34 changed files
with
587 additions
and
361 deletions.
There are no files selected for viewing
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,28 @@ | ||
# Number of days of inactivity before an issue becomes stale | ||
daysUntilStale: 30 | ||
# Number of days of inactivity before a stale issue is closed | ||
daysUntilClose: 7 | ||
# Issues with these labels will never be considered stale | ||
exemptLabels: | ||
- important | ||
# Label to use when marking an issue as stale | ||
staleLabel: stale | ||
# Comment to post when marking an issue as stale. Set to `false` to disable | ||
markComment: > | ||
This issue has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. | ||
If this is still an issue, please make sure it is up to date and if so, | ||
add a comment that this is still an issue to keep it open. | ||
Thank you for your contributions. | ||
# Comment to post when closing a stale issue. Set to `false` to disable | ||
closeComment: false | ||
|
||
# Optionally, specify configuration settings that are specific to just 'issues' or 'pulls': | ||
pulls: | ||
daysUntilStale: 60 | ||
markComment: > | ||
This pull request has been automatically marked as stale because it has not had | ||
recent activity. It will be closed if no further activity occurs. | ||
If this is still applicable, please make sure it is up to date and if so, | ||
add a comment that this is still an issue to keep it open. | ||
Thank you for your contributions. |
23 changes: 23 additions & 0 deletions
23
Dependencies/SDWebImage-master/SDWebImage/UIImage+MemoryCacheCost.h
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,23 @@ | ||
/* | ||
* This file is part of the SDWebImage package. | ||
* (c) Olivier Poitrey <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
#import "SDWebImageCompat.h" | ||
|
||
@interface UIImage (MemoryCacheCost) | ||
|
||
/** | ||
The memory cache cost for specify image used by image cache. The cost function is the pixles count held in memory. | ||
If you set some associated object to `UIImage`, you can set the custom value to indicate the memory cost. | ||
For `UIImage`, this method return the single frame pixles count when `image.images` is nil for static image. Retuen full frame pixels count when `image.images` is not nil for animated image. | ||
For `NSImage`, this method return the single frame pixels count because `NSImage` does not store all frames in memory. | ||
@note Note that because of the limitations of categories this property can get out of sync if you create another instance with CGImage or other methods. | ||
*/ | ||
@property (assign, nonatomic) NSUInteger sd_memoryCost; | ||
|
||
@end |
38 changes: 38 additions & 0 deletions
38
Dependencies/SDWebImage-master/SDWebImage/UIImage+MemoryCacheCost.m
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,38 @@ | ||
/* | ||
* This file is part of the SDWebImage package. | ||
* (c) Olivier Poitrey <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
#import "UIImage+MemoryCacheCost.h" | ||
#import "objc/runtime.h" | ||
|
||
FOUNDATION_STATIC_INLINE NSUInteger SDMemoryCacheCostForImage(UIImage *image) { | ||
#if SD_MAC | ||
return image.size.height * image.size.width; | ||
#elif SD_UIKIT || SD_WATCH | ||
NSUInteger imageSize = image.size.height * image.size.width * image.scale * image.scale; | ||
return image.images ? (imageSize * image.images.count) : imageSize; | ||
#endif | ||
} | ||
|
||
@implementation UIImage (MemoryCacheCost) | ||
|
||
- (NSUInteger)sd_memoryCost { | ||
NSNumber *value = objc_getAssociatedObject(self, @selector(sd_memoryCost)); | ||
NSUInteger memoryCost; | ||
if (value != nil) { | ||
memoryCost = [value unsignedIntegerValue]; | ||
} else { | ||
memoryCost = SDMemoryCacheCostForImage(self); | ||
} | ||
return memoryCost; | ||
} | ||
|
||
- (void)setSd_memoryCost:(NSUInteger)sd_memoryCost { | ||
objc_setAssociatedObject(self, @selector(sd_memoryCost), @(sd_memoryCost), OBJC_ASSOCIATION_RETAIN_NONATOMIC); | ||
} | ||
|
||
@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
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
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
Empty file.
Empty file.
Empty file.
Empty file modified
0
dependencies/SDWebImage-master/.github/PULL_REQUEST_TEMPLATE.md
100755 → 100644
Empty file.
Empty file.
Empty file.
Empty file.
Oops, something went wrong.