mirror of
https://github.com/ecency/ecency-mobile.git
synced 2024-12-18 19:01:38 +03:00
Merge pull request #522 from esteemapp/feature/currency
Feature/currency
This commit is contained in:
commit
eadb926ed7
@ -79,8 +79,8 @@ PODS:
|
|||||||
- React/Core
|
- React/Core
|
||||||
- RSKImageCropper
|
- RSKImageCropper
|
||||||
- RSKImageCropper (2.2.1)
|
- RSKImageCropper (2.2.1)
|
||||||
- SDWebImage/Core (4.4.3)
|
- SDWebImage/Core (4.4.4)
|
||||||
- SDWebImage/GIF (4.4.3):
|
- SDWebImage/GIF (4.4.4):
|
||||||
- FLAnimatedImage (~> 1.0)
|
- FLAnimatedImage (~> 1.0)
|
||||||
- SDWebImage/Core
|
- SDWebImage/Core
|
||||||
- SSZipArchive (2.1.4)
|
- SSZipArchive (2.1.4)
|
||||||
@ -160,7 +160,7 @@ SPEC CHECKSUMS:
|
|||||||
react-native-version-number: 36c0d8eb57a275a6239a860f8dbab3d18299b0e0
|
react-native-version-number: 36c0d8eb57a275a6239a860f8dbab3d18299b0e0
|
||||||
RNImageCropPicker: 32ca4b9fef4e1b7b85ba69494242122948117e06
|
RNImageCropPicker: 32ca4b9fef4e1b7b85ba69494242122948117e06
|
||||||
RSKImageCropper: 98296ad26b41753f796b6898d015509598f13d97
|
RSKImageCropper: 98296ad26b41753f796b6898d015509598f13d97
|
||||||
SDWebImage: c5594f1a19c48d526d321e548902b56b479cd508
|
SDWebImage: c00ec18ab25d10e5ffac109b0f78d1b4341c9691
|
||||||
SSZipArchive: 41455d4b8d2b6ab93990820b50dc697c2554a322
|
SSZipArchive: 41455d4b8d2b6ab93990820b50dc697c2554a322
|
||||||
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
|
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
|
||||||
|
|
||||||
|
1
ios/Pods/Headers/Private/SDWebImage/UIImage+MemoryCacheCost.h
generated
Symbolic link
1
ios/Pods/Headers/Private/SDWebImage/UIImage+MemoryCacheCost.h
generated
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../SDWebImage/SDWebImage/UIImage+MemoryCacheCost.h
|
45
ios/Pods/Headers/Public/SDWebImage/SDWebImage-umbrella.h
generated
Normal file
45
ios/Pods/Headers/Public/SDWebImage/SDWebImage-umbrella.h
generated
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
#ifdef __OBJC__
|
||||||
|
#import <UIKit/UIKit.h>
|
||||||
|
#else
|
||||||
|
#ifndef FOUNDATION_EXPORT
|
||||||
|
#if defined(__cplusplus)
|
||||||
|
#define FOUNDATION_EXPORT extern "C"
|
||||||
|
#else
|
||||||
|
#define FOUNDATION_EXPORT extern
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#import "NSButton+WebCache.h"
|
||||||
|
#import "NSData+ImageContentType.h"
|
||||||
|
#import "NSImage+WebCache.h"
|
||||||
|
#import "SDAnimatedImageRep.h"
|
||||||
|
#import "SDImageCache.h"
|
||||||
|
#import "SDImageCacheConfig.h"
|
||||||
|
#import "SDWebImageCoder.h"
|
||||||
|
#import "SDWebImageCoderHelper.h"
|
||||||
|
#import "SDWebImageCodersManager.h"
|
||||||
|
#import "SDWebImageCompat.h"
|
||||||
|
#import "SDWebImageDownloader.h"
|
||||||
|
#import "SDWebImageDownloaderOperation.h"
|
||||||
|
#import "SDWebImageFrame.h"
|
||||||
|
#import "SDWebImageGIFCoder.h"
|
||||||
|
#import "SDWebImageImageIOCoder.h"
|
||||||
|
#import "SDWebImageManager.h"
|
||||||
|
#import "SDWebImageOperation.h"
|
||||||
|
#import "SDWebImagePrefetcher.h"
|
||||||
|
#import "SDWebImageTransition.h"
|
||||||
|
#import "UIButton+WebCache.h"
|
||||||
|
#import "UIImage+ForceDecode.h"
|
||||||
|
#import "UIImage+GIF.h"
|
||||||
|
#import "UIImage+MemoryCacheCost.h"
|
||||||
|
#import "UIImage+MultiFormat.h"
|
||||||
|
#import "UIImageView+HighlightedWebCache.h"
|
||||||
|
#import "UIImageView+WebCache.h"
|
||||||
|
#import "UIView+WebCache.h"
|
||||||
|
#import "UIView+WebCacheOperation.h"
|
||||||
|
#import "FLAnimatedImageView+WebCache.h"
|
||||||
|
|
||||||
|
FOUNDATION_EXPORT double SDWebImageVersionNumber;
|
||||||
|
FOUNDATION_EXPORT const unsigned char SDWebImageVersionString[];
|
||||||
|
|
6
ios/Pods/Headers/Public/SDWebImage/SDWebImage.modulemap
generated
Normal file
6
ios/Pods/Headers/Public/SDWebImage/SDWebImage.modulemap
generated
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
module SDWebImage {
|
||||||
|
umbrella header "SDWebImage-umbrella.h"
|
||||||
|
|
||||||
|
export *
|
||||||
|
module * { export * }
|
||||||
|
}
|
1
ios/Pods/Headers/Public/SDWebImage/UIImage+MemoryCacheCost.h
generated
Symbolic link
1
ios/Pods/Headers/Public/SDWebImage/UIImage+MemoryCacheCost.h
generated
Symbolic link
@ -0,0 +1 @@
|
|||||||
|
../../../SDWebImage/SDWebImage/UIImage+MemoryCacheCost.h
|
6
ios/Pods/Manifest.lock
generated
6
ios/Pods/Manifest.lock
generated
@ -79,8 +79,8 @@ PODS:
|
|||||||
- React/Core
|
- React/Core
|
||||||
- RSKImageCropper
|
- RSKImageCropper
|
||||||
- RSKImageCropper (2.2.1)
|
- RSKImageCropper (2.2.1)
|
||||||
- SDWebImage/Core (4.4.3)
|
- SDWebImage/Core (4.4.4)
|
||||||
- SDWebImage/GIF (4.4.3):
|
- SDWebImage/GIF (4.4.4):
|
||||||
- FLAnimatedImage (~> 1.0)
|
- FLAnimatedImage (~> 1.0)
|
||||||
- SDWebImage/Core
|
- SDWebImage/Core
|
||||||
- SSZipArchive (2.1.4)
|
- SSZipArchive (2.1.4)
|
||||||
@ -160,7 +160,7 @@ SPEC CHECKSUMS:
|
|||||||
react-native-version-number: 36c0d8eb57a275a6239a860f8dbab3d18299b0e0
|
react-native-version-number: 36c0d8eb57a275a6239a860f8dbab3d18299b0e0
|
||||||
RNImageCropPicker: 32ca4b9fef4e1b7b85ba69494242122948117e06
|
RNImageCropPicker: 32ca4b9fef4e1b7b85ba69494242122948117e06
|
||||||
RSKImageCropper: 98296ad26b41753f796b6898d015509598f13d97
|
RSKImageCropper: 98296ad26b41753f796b6898d015509598f13d97
|
||||||
SDWebImage: c5594f1a19c48d526d321e548902b56b479cd508
|
SDWebImage: c00ec18ab25d10e5ffac109b0f78d1b4341c9691
|
||||||
SSZipArchive: 41455d4b8d2b6ab93990820b50dc697c2554a322
|
SSZipArchive: 41455d4b8d2b6ab93990820b50dc697c2554a322
|
||||||
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
|
yoga: b1ce48b6cf950b98deae82838f5173ea7cf89e85
|
||||||
|
|
||||||
|
684
ios/Pods/Pods.xcodeproj/project.pbxproj
generated
684
ios/Pods/Pods.xcodeproj/project.pbxproj
generated
File diff suppressed because it is too large
Load Diff
11
ios/Pods/SDWebImage/README.md
generated
11
ios/Pods/SDWebImage/README.md
generated
@ -110,7 +110,16 @@ platform :ios, '7.0'
|
|||||||
pod 'SDWebImage', '~> 4.0'
|
pod 'SDWebImage', '~> 4.0'
|
||||||
```
|
```
|
||||||
|
|
||||||
If you are using Swift, be sure to add `use_frameworks!` and set your target to iOS 8+:
|
##### Swift
|
||||||
|
|
||||||
|
If you are using `Swift`, `Xcode 9+` and `CocoaPods` `1.5.0+`, you only need to set your target to `iOS 8+` if you need static library:
|
||||||
|
|
||||||
|
```
|
||||||
|
platform :ios, '8.0'
|
||||||
|
```
|
||||||
|
|
||||||
|
If not, you still need to add `use_frameworks!` to use dynamic framework:
|
||||||
|
|
||||||
```
|
```
|
||||||
platform :ios, '8.0'
|
platform :ios, '8.0'
|
||||||
use_frameworks!
|
use_frameworks!
|
||||||
|
@ -15,6 +15,20 @@
|
|||||||
#import "NSData+ImageContentType.h"
|
#import "NSData+ImageContentType.h"
|
||||||
#import "UIImageView+WebCache.h"
|
#import "UIImageView+WebCache.h"
|
||||||
#import "UIImage+MultiFormat.h"
|
#import "UIImage+MultiFormat.h"
|
||||||
|
#import "UIImage+MemoryCacheCost.h"
|
||||||
|
|
||||||
|
@interface UIView (PrivateWebCache)
|
||||||
|
|
||||||
|
- (void)sd_internalSetImageWithURL:(nullable NSURL *)url
|
||||||
|
placeholderImage:(nullable UIImage *)placeholder
|
||||||
|
options:(SDWebImageOptions)options
|
||||||
|
operationKey:(nullable NSString *)operationKey
|
||||||
|
internalSetImageBlock:(nullable SDInternalSetImageBlock)setImageBlock
|
||||||
|
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock
|
||||||
|
completed:(nullable SDExternalCompletionBlock)completedBlock
|
||||||
|
context:(nullable NSDictionary<NSString *, id> *)context;
|
||||||
|
|
||||||
|
@end
|
||||||
|
|
||||||
static inline FLAnimatedImage * SDWebImageCreateFLAnimatedImage(FLAnimatedImageView *imageView, NSData *imageData) {
|
static inline FLAnimatedImage * SDWebImageCreateFLAnimatedImage(FLAnimatedImageView *imageView, NSData *imageData) {
|
||||||
if ([NSData sd_imageFormatForImageData:imageData] != SDImageFormatGIF) {
|
if ([NSData sd_imageFormatForImageData:imageData] != SDImageFormatGIF) {
|
||||||
@ -30,6 +44,17 @@ static inline FLAnimatedImage * SDWebImageCreateFLAnimatedImage(FLAnimatedImageV
|
|||||||
return animatedImage;
|
return animatedImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline NSUInteger SDWebImageMemoryCostFLAnimatedImage(FLAnimatedImage *animatedImage, UIImage *image) {
|
||||||
|
NSUInteger frameCacheSizeCurrent = animatedImage.frameCacheSizeCurrent; // [1...frame count], more suitable than raw frame count because FLAnimatedImage internal actually store a buffer size but not full frames (they called `window`)
|
||||||
|
NSUInteger pixelsPerFrame = animatedImage.size.width * animatedImage.size.height; // FLAnimatedImage does not support scale factor
|
||||||
|
NSUInteger animatedImageCost = frameCacheSizeCurrent * pixelsPerFrame;
|
||||||
|
|
||||||
|
NSUInteger imageCost = image.size.height * image.size.width * image.scale * image.scale; // Same as normal cost calculation
|
||||||
|
imageCost = image.images ? (imageCost * image.images.count) : imageCost;
|
||||||
|
|
||||||
|
return animatedImageCost + imageCost;
|
||||||
|
}
|
||||||
|
|
||||||
@implementation UIImage (FLAnimatedImage)
|
@implementation UIImage (FLAnimatedImage)
|
||||||
|
|
||||||
- (FLAnimatedImage *)sd_FLAnimatedImage {
|
- (FLAnimatedImage *)sd_FLAnimatedImage {
|
||||||
@ -119,7 +144,7 @@ static inline FLAnimatedImage * SDWebImageCreateFLAnimatedImage(FLAnimatedImageV
|
|||||||
placeholderImage:placeholder
|
placeholderImage:placeholder
|
||||||
options:options
|
options:options
|
||||||
operationKey:nil
|
operationKey:nil
|
||||||
setImageBlock:^(UIImage *image, NSData *imageData) {
|
internalSetImageBlock:^(UIImage * _Nullable image, NSData * _Nullable imageData, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
|
||||||
__strong typeof(weakSelf)strongSelf = weakSelf;
|
__strong typeof(weakSelf)strongSelf = weakSelf;
|
||||||
if (!strongSelf) {
|
if (!strongSelf) {
|
||||||
dispatch_group_leave(group);
|
dispatch_group_leave(group);
|
||||||
@ -138,7 +163,7 @@ static inline FLAnimatedImage * SDWebImageCreateFLAnimatedImage(FLAnimatedImageV
|
|||||||
// Step 2. Check if original compressed image data is "GIF"
|
// Step 2. Check if original compressed image data is "GIF"
|
||||||
BOOL isGIF = (image.sd_imageFormat == SDImageFormatGIF || [NSData sd_imageFormatForImageData:imageData] == SDImageFormatGIF);
|
BOOL isGIF = (image.sd_imageFormat == SDImageFormatGIF || [NSData sd_imageFormatForImageData:imageData] == SDImageFormatGIF);
|
||||||
// Check if placeholder, which does not trigger a backup disk cache query
|
// Check if placeholder, which does not trigger a backup disk cache query
|
||||||
BOOL isPlaceholder = (image == placeholder);
|
BOOL isPlaceholder = !imageData && image && cacheType == SDImageCacheTypeNone;
|
||||||
if (!isGIF || isPlaceholder) {
|
if (!isGIF || isPlaceholder) {
|
||||||
strongSelf.image = image;
|
strongSelf.image = image;
|
||||||
strongSelf.animatedImage = nil;
|
strongSelf.animatedImage = nil;
|
||||||
@ -152,9 +177,9 @@ static inline FLAnimatedImage * SDWebImageCreateFLAnimatedImage(FLAnimatedImageV
|
|||||||
__strong typeof(wweakSelf) sstrongSelf = wweakSelf;
|
__strong typeof(wweakSelf) sstrongSelf = wweakSelf;
|
||||||
if (!sstrongSelf || ![url isEqual:sstrongSelf.sd_imageURL]) { return ; }
|
if (!sstrongSelf || ![url isEqual:sstrongSelf.sd_imageURL]) { return ; }
|
||||||
// Step 3. Check if data exist or query disk cache
|
// Step 3. Check if data exist or query disk cache
|
||||||
|
NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:url];
|
||||||
__block NSData *gifData = imageData;
|
__block NSData *gifData = imageData;
|
||||||
if (!gifData) {
|
if (!gifData) {
|
||||||
NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:url];
|
|
||||||
gifData = [[SDImageCache sharedImageCache] diskImageDataForKey:key];
|
gifData = [[SDImageCache sharedImageCache] diskImageDataForKey:key];
|
||||||
}
|
}
|
||||||
// Step 4. Create FLAnimatedImage
|
// Step 4. Create FLAnimatedImage
|
||||||
@ -163,8 +188,12 @@ static inline FLAnimatedImage * SDWebImageCreateFLAnimatedImage(FLAnimatedImageV
|
|||||||
if (![url isEqual:sstrongSelf.sd_imageURL]) { return ; }
|
if (![url isEqual:sstrongSelf.sd_imageURL]) { return ; }
|
||||||
// Step 5. Set animatedImage or normal image
|
// Step 5. Set animatedImage or normal image
|
||||||
if (animatedImage) {
|
if (animatedImage) {
|
||||||
if (sstrongSelf.sd_cacheFLAnimatedImage) {
|
if (sstrongSelf.sd_cacheFLAnimatedImage && SDImageCache.sharedImageCache.config.shouldCacheImagesInMemory) {
|
||||||
image.sd_FLAnimatedImage = animatedImage;
|
image.sd_FLAnimatedImage = animatedImage;
|
||||||
|
image.sd_memoryCost = SDWebImageMemoryCostFLAnimatedImage(animatedImage, image);
|
||||||
|
// Update the memory cache
|
||||||
|
[SDImageCache.sharedImageCache removeImageForKey:key fromDisk:NO withCompletion:nil];
|
||||||
|
[SDImageCache.sharedImageCache storeImage:image forKey:key toDisk:NO completion:nil];
|
||||||
}
|
}
|
||||||
sstrongSelf.image = animatedImage.posterImage;
|
sstrongSelf.image = animatedImage.posterImage;
|
||||||
sstrongSelf.animatedImage = animatedImage;
|
sstrongSelf.animatedImage = animatedImage;
|
||||||
|
21
ios/Pods/SDWebImage/SDWebImage/SDImageCache.m
generated
21
ios/Pods/SDWebImage/SDWebImage/SDImageCache.m
generated
@ -9,6 +9,7 @@
|
|||||||
#import "SDImageCache.h"
|
#import "SDImageCache.h"
|
||||||
#import <CommonCrypto/CommonDigest.h>
|
#import <CommonCrypto/CommonDigest.h>
|
||||||
#import "NSImage+WebCache.h"
|
#import "NSImage+WebCache.h"
|
||||||
|
#import "UIImage+MemoryCacheCost.h"
|
||||||
#import "SDWebImageCodersManager.h"
|
#import "SDWebImageCodersManager.h"
|
||||||
|
|
||||||
#define SD_MAX_FILE_EXTENSION_LENGTH (NAME_MAX - CC_MD5_DIGEST_LENGTH * 2 - 1)
|
#define SD_MAX_FILE_EXTENSION_LENGTH (NAME_MAX - CC_MD5_DIGEST_LENGTH * 2 - 1)
|
||||||
@ -16,14 +17,6 @@
|
|||||||
#define LOCK(lock) dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER);
|
#define LOCK(lock) dispatch_semaphore_wait(lock, DISPATCH_TIME_FOREVER);
|
||||||
#define UNLOCK(lock) dispatch_semaphore_signal(lock);
|
#define UNLOCK(lock) dispatch_semaphore_signal(lock);
|
||||||
|
|
||||||
FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|
||||||
#if SD_MAC
|
|
||||||
return image.size.height * image.size.width;
|
|
||||||
#elif SD_UIKIT || SD_WATCH
|
|
||||||
return image.size.height * image.size.width * image.scale * image.scale;
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
// A memory cache which auto purge the cache on memory warning and support weak cache.
|
// A memory cache which auto purge the cache on memory warning and support weak cache.
|
||||||
@interface SDMemoryCache <KeyType, ObjectType> : NSCache <KeyType, ObjectType>
|
@interface SDMemoryCache <KeyType, ObjectType> : NSCache <KeyType, ObjectType>
|
||||||
|
|
||||||
@ -82,7 +75,9 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|||||||
if (key && obj) {
|
if (key && obj) {
|
||||||
// Store weak cache
|
// Store weak cache
|
||||||
LOCK(self.weakCacheLock);
|
LOCK(self.weakCacheLock);
|
||||||
[self.weakCache setObject:obj forKey:key];
|
// Do the real copy of the key and only let NSMapTable manage the key's lifetime
|
||||||
|
// Fixes issue #2507 https://github.com/SDWebImage/SDWebImage/issues/2507
|
||||||
|
[self.weakCache setObject:obj forKey:[[key mutableCopy] copy]];
|
||||||
UNLOCK(self.weakCacheLock);
|
UNLOCK(self.weakCacheLock);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -101,7 +96,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|||||||
// Sync cache
|
// Sync cache
|
||||||
NSUInteger cost = 0;
|
NSUInteger cost = 0;
|
||||||
if ([obj isKindOfClass:[UIImage class]]) {
|
if ([obj isKindOfClass:[UIImage class]]) {
|
||||||
cost = SDCacheCostForImage(obj);
|
cost = [(UIImage *)obj sd_memoryCost];
|
||||||
}
|
}
|
||||||
[super setObject:obj forKey:key cost:cost];
|
[super setObject:obj forKey:key cost:cost];
|
||||||
}
|
}
|
||||||
@ -298,7 +293,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|||||||
}
|
}
|
||||||
// if memory cache is enabled
|
// if memory cache is enabled
|
||||||
if (self.config.shouldCacheImagesInMemory) {
|
if (self.config.shouldCacheImagesInMemory) {
|
||||||
NSUInteger cost = SDCacheCostForImage(image);
|
NSUInteger cost = image.sd_memoryCost;
|
||||||
[self.memCache setObject:image forKey:key cost:cost];
|
[self.memCache setObject:image forKey:key cost:cost];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -424,7 +419,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|||||||
- (nullable UIImage *)imageFromDiskCacheForKey:(nullable NSString *)key {
|
- (nullable UIImage *)imageFromDiskCacheForKey:(nullable NSString *)key {
|
||||||
UIImage *diskImage = [self diskImageForKey:key];
|
UIImage *diskImage = [self diskImageForKey:key];
|
||||||
if (diskImage && self.config.shouldCacheImagesInMemory) {
|
if (diskImage && self.config.shouldCacheImagesInMemory) {
|
||||||
NSUInteger cost = SDCacheCostForImage(diskImage);
|
NSUInteger cost = diskImage.sd_memoryCost;
|
||||||
[self.memCache setObject:diskImage forKey:key cost:cost];
|
[self.memCache setObject:diskImage forKey:key cost:cost];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -545,7 +540,7 @@ FOUNDATION_STATIC_INLINE NSUInteger SDCacheCostForImage(UIImage *image) {
|
|||||||
// decode image data only if in-memory cache missed
|
// decode image data only if in-memory cache missed
|
||||||
diskImage = [self diskImageForKey:key data:diskData options:options];
|
diskImage = [self diskImageForKey:key data:diskData options:options];
|
||||||
if (diskImage && self.config.shouldCacheImagesInMemory) {
|
if (diskImage && self.config.shouldCacheImagesInMemory) {
|
||||||
NSUInteger cost = SDCacheCostForImage(diskImage);
|
NSUInteger cost = diskImage.sd_memoryCost;
|
||||||
[self.memCache setObject:diskImage forKey:key cost:cost];
|
[self.memCache setObject:diskImage forKey:key cost:cost];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -289,8 +289,8 @@
|
|||||||
|
|
||||||
LOCK(self.operationsLock);
|
LOCK(self.operationsLock);
|
||||||
NSOperation<SDWebImageDownloaderOperationInterface> *operation = [self.URLOperations objectForKey:url];
|
NSOperation<SDWebImageDownloaderOperationInterface> *operation = [self.URLOperations objectForKey:url];
|
||||||
// There is a case that the operation may be marked as finished, but not been removed from `self.URLOperations`.
|
// There is a case that the operation may be marked as finished or cancelled, but not been removed from `self.URLOperations`.
|
||||||
if (!operation || operation.isFinished) {
|
if (!operation || operation.isFinished || operation.isCancelled) {
|
||||||
operation = [self createDownloaderOperationWithUrl:url options:options];
|
operation = [self createDownloaderOperationWithUrl:url options:options];
|
||||||
__weak typeof(self) wself = self;
|
__weak typeof(self) wself = self;
|
||||||
operation.completionBlock = ^{
|
operation.completionBlock = ^{
|
||||||
@ -307,6 +307,15 @@
|
|||||||
// `addOperation:` does not synchronously execute the `operation.completionBlock` so this will not cause deadlock.
|
// `addOperation:` does not synchronously execute the `operation.completionBlock` so this will not cause deadlock.
|
||||||
[self.downloadQueue addOperation:operation];
|
[self.downloadQueue addOperation:operation];
|
||||||
}
|
}
|
||||||
|
else if (!operation.isExecuting) {
|
||||||
|
if (options & SDWebImageDownloaderHighPriority) {
|
||||||
|
operation.queuePriority = NSOperationQueuePriorityHigh;
|
||||||
|
} else if (options & SDWebImageDownloaderLowPriority) {
|
||||||
|
operation.queuePriority = NSOperationQueuePriorityLow;
|
||||||
|
} else {
|
||||||
|
operation.queuePriority = NSOperationQueuePriorityNormal;
|
||||||
|
}
|
||||||
|
}
|
||||||
UNLOCK(self.operationsLock);
|
UNLOCK(self.operationsLock);
|
||||||
|
|
||||||
id downloadOperationCancelToken = [operation addHandlersForProgress:progressBlock completed:completedBlock];
|
id downloadOperationCancelToken = [operation addHandlersForProgress:progressBlock completed:completedBlock];
|
||||||
|
@ -82,6 +82,9 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
|||||||
_unownedSession = session;
|
_unownedSession = session;
|
||||||
_callbacksLock = dispatch_semaphore_create(1);
|
_callbacksLock = dispatch_semaphore_create(1);
|
||||||
_coderQueue = dispatch_queue_create("com.hackemist.SDWebImageDownloaderOperationCoderQueue", DISPATCH_QUEUE_SERIAL);
|
_coderQueue = dispatch_queue_create("com.hackemist.SDWebImageDownloaderOperationCoderQueue", DISPATCH_QUEUE_SERIAL);
|
||||||
|
#if SD_UIKIT
|
||||||
|
_backgroundTaskId = UIBackgroundTaskInvalid;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return self;
|
return self;
|
||||||
}
|
}
|
||||||
@ -135,14 +138,7 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
|||||||
__weak __typeof__ (self) wself = self;
|
__weak __typeof__ (self) wself = self;
|
||||||
UIApplication * app = [UIApplicationClass performSelector:@selector(sharedApplication)];
|
UIApplication * app = [UIApplicationClass performSelector:@selector(sharedApplication)];
|
||||||
self.backgroundTaskId = [app beginBackgroundTaskWithExpirationHandler:^{
|
self.backgroundTaskId = [app beginBackgroundTaskWithExpirationHandler:^{
|
||||||
__strong __typeof (wself) sself = wself;
|
[wself cancel];
|
||||||
|
|
||||||
if (sself) {
|
|
||||||
[sself cancel];
|
|
||||||
|
|
||||||
[app endBackgroundTask:sself.backgroundTaskId];
|
|
||||||
sself.backgroundTaskId = UIBackgroundTaskInvalid;
|
|
||||||
}
|
|
||||||
}];
|
}];
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -197,27 +193,15 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
|||||||
for (SDWebImageDownloaderProgressBlock progressBlock in [self callbacksForKey:kProgressCallbackKey]) {
|
for (SDWebImageDownloaderProgressBlock progressBlock in [self callbacksForKey:kProgressCallbackKey]) {
|
||||||
progressBlock(0, NSURLResponseUnknownLength, self.request.URL);
|
progressBlock(0, NSURLResponseUnknownLength, self.request.URL);
|
||||||
}
|
}
|
||||||
__weak typeof(self) weakSelf = self;
|
__block typeof(self) strongSelf = self;
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStartNotification object:weakSelf];
|
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStartNotification object:strongSelf];
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
[self callCompletionBlocksWithError:[NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorUnknown userInfo:@{NSLocalizedDescriptionKey : @"Task can't be initialized"}]];
|
[self callCompletionBlocksWithError:[NSError errorWithDomain:NSURLErrorDomain code:NSURLErrorUnknown userInfo:@{NSLocalizedDescriptionKey : @"Task can't be initialized"}]];
|
||||||
[self done];
|
[self done];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if SD_UIKIT
|
|
||||||
Class UIApplicationClass = NSClassFromString(@"UIApplication");
|
|
||||||
if(!UIApplicationClass || ![UIApplicationClass respondsToSelector:@selector(sharedApplication)]) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (self.backgroundTaskId != UIBackgroundTaskInvalid) {
|
|
||||||
UIApplication * app = [UIApplication performSelector:@selector(sharedApplication)];
|
|
||||||
[app endBackgroundTask:self.backgroundTaskId];
|
|
||||||
self.backgroundTaskId = UIBackgroundTaskInvalid;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)cancel {
|
- (void)cancel {
|
||||||
@ -232,9 +216,9 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
|||||||
|
|
||||||
if (self.dataTask) {
|
if (self.dataTask) {
|
||||||
[self.dataTask cancel];
|
[self.dataTask cancel];
|
||||||
__weak typeof(self) weakSelf = self;
|
__block typeof(self) strongSelf = self;
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:weakSelf];
|
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:strongSelf];
|
||||||
});
|
});
|
||||||
|
|
||||||
// As we cancelled the task, its callback won't be called and thus won't
|
// As we cancelled the task, its callback won't be called and thus won't
|
||||||
@ -256,11 +240,23 @@ typedef NSMutableDictionary<NSString *, id> SDCallbacksDictionary;
|
|||||||
LOCK(self.callbacksLock);
|
LOCK(self.callbacksLock);
|
||||||
[self.callbackBlocks removeAllObjects];
|
[self.callbackBlocks removeAllObjects];
|
||||||
UNLOCK(self.callbacksLock);
|
UNLOCK(self.callbacksLock);
|
||||||
self.dataTask = nil;
|
|
||||||
|
|
||||||
if (self.ownedSession) {
|
@synchronized (self) {
|
||||||
[self.ownedSession invalidateAndCancel];
|
self.dataTask = nil;
|
||||||
self.ownedSession = nil;
|
|
||||||
|
if (self.ownedSession) {
|
||||||
|
[self.ownedSession invalidateAndCancel];
|
||||||
|
self.ownedSession = nil;
|
||||||
|
}
|
||||||
|
|
||||||
|
#if SD_UIKIT
|
||||||
|
if (self.backgroundTaskId != UIBackgroundTaskInvalid) {
|
||||||
|
// If backgroundTaskId != UIBackgroundTaskInvalid, sharedApplication is always exist
|
||||||
|
UIApplication * app = [UIApplication performSelector:@selector(sharedApplication)];
|
||||||
|
[app endBackgroundTask:self.backgroundTaskId];
|
||||||
|
self.backgroundTaskId = UIBackgroundTaskInvalid;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -307,10 +303,9 @@ didReceiveResponse:(NSURLResponse *)response
|
|||||||
// Status code invalid and marked as cancelled. Do not call `[self.dataTask cancel]` which may mass up URLSession life cycle
|
// Status code invalid and marked as cancelled. Do not call `[self.dataTask cancel]` which may mass up URLSession life cycle
|
||||||
disposition = NSURLSessionResponseCancel;
|
disposition = NSURLSessionResponseCancel;
|
||||||
}
|
}
|
||||||
|
__block typeof(self) strongSelf = self;
|
||||||
__weak typeof(self) weakSelf = self;
|
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadReceiveResponseNotification object:weakSelf];
|
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadReceiveResponseNotification object:strongSelf];
|
||||||
});
|
});
|
||||||
|
|
||||||
if (completionHandler) {
|
if (completionHandler) {
|
||||||
@ -388,11 +383,11 @@ didReceiveResponse:(NSURLResponse *)response
|
|||||||
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error {
|
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didCompleteWithError:(NSError *)error {
|
||||||
@synchronized(self) {
|
@synchronized(self) {
|
||||||
self.dataTask = nil;
|
self.dataTask = nil;
|
||||||
__weak typeof(self) weakSelf = self;
|
__block typeof(self) strongSelf = self;
|
||||||
dispatch_async(dispatch_get_main_queue(), ^{
|
dispatch_async(dispatch_get_main_queue(), ^{
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:weakSelf];
|
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadStopNotification object:strongSelf];
|
||||||
if (!error) {
|
if (!error) {
|
||||||
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadFinishNotification object:weakSelf];
|
[[NSNotificationCenter defaultCenter] postNotificationName:SDWebImageDownloadFinishNotification object:strongSelf];
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -423,19 +418,8 @@ didReceiveResponse:(NSURLResponse *)response
|
|||||||
NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:self.request.URL];
|
NSString *key = [[SDWebImageManager sharedManager] cacheKeyForURL:self.request.URL];
|
||||||
image = [self scaledImageForKey:key image:image];
|
image = [self scaledImageForKey:key image:image];
|
||||||
|
|
||||||
BOOL shouldDecode = YES;
|
// Do not force decoding animated images
|
||||||
// Do not force decoding animated GIFs and WebPs
|
BOOL shouldDecode = !image.images;
|
||||||
if (image.images) {
|
|
||||||
shouldDecode = NO;
|
|
||||||
} else {
|
|
||||||
#ifdef SD_WEBP
|
|
||||||
SDImageFormat imageFormat = [NSData sd_imageFormatForImageData:imageData];
|
|
||||||
if (imageFormat == SDImageFormatWebP) {
|
|
||||||
shouldDecode = NO;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
|
|
||||||
if (shouldDecode) {
|
if (shouldDecode) {
|
||||||
if (self.shouldDecompressImages) {
|
if (self.shouldDecompressImages) {
|
||||||
BOOL shouldScaleDown = self.options & SDWebImageDownloaderScaleDownLargeImages;
|
BOOL shouldScaleDown = self.options & SDWebImageDownloaderScaleDownLargeImages;
|
||||||
|
23
ios/Pods/SDWebImage/SDWebImage/UIImage+MemoryCacheCost.h
generated
Normal file
23
ios/Pods/SDWebImage/SDWebImage/UIImage+MemoryCacheCost.h
generated
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the SDWebImage package.
|
||||||
|
* (c) Olivier Poitrey <rs@dailymotion.com>
|
||||||
|
*
|
||||||
|
* 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
ios/Pods/SDWebImage/SDWebImage/UIImage+MemoryCacheCost.m
generated
Normal file
38
ios/Pods/SDWebImage/SDWebImage/UIImage+MemoryCacheCost.m
generated
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
/*
|
||||||
|
* This file is part of the SDWebImage package.
|
||||||
|
* (c) Olivier Poitrey <rs@dailymotion.com>
|
||||||
|
*
|
||||||
|
* 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
|
1
ios/Pods/SDWebImage/SDWebImage/UIView+WebCache.h
generated
1
ios/Pods/SDWebImage/SDWebImage/UIView+WebCache.h
generated
@ -24,6 +24,7 @@ FOUNDATION_EXPORT NSString * _Nonnull const SDWebImageExternalCustomManagerKey;
|
|||||||
FOUNDATION_EXPORT const int64_t SDWebImageProgressUnitCountUnknown; /* 1LL */
|
FOUNDATION_EXPORT const int64_t SDWebImageProgressUnitCountUnknown; /* 1LL */
|
||||||
|
|
||||||
typedef void(^SDSetImageBlock)(UIImage * _Nullable image, NSData * _Nullable imageData);
|
typedef void(^SDSetImageBlock)(UIImage * _Nullable image, NSData * _Nullable imageData);
|
||||||
|
typedef void(^SDInternalSetImageBlock)(UIImage * _Nullable image, NSData * _Nullable imageData, SDImageCacheType cacheType, NSURL * _Nullable imageURL);
|
||||||
|
|
||||||
@interface UIView (WebCache)
|
@interface UIView (WebCache)
|
||||||
|
|
||||||
|
43
ios/Pods/SDWebImage/SDWebImage/UIView+WebCache.m
generated
43
ios/Pods/SDWebImage/SDWebImage/UIView+WebCache.m
generated
@ -60,6 +60,25 @@ static char TAG_ACTIVITY_SHOW;
|
|||||||
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock
|
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock
|
||||||
completed:(nullable SDExternalCompletionBlock)completedBlock
|
completed:(nullable SDExternalCompletionBlock)completedBlock
|
||||||
context:(nullable NSDictionary<NSString *, id> *)context {
|
context:(nullable NSDictionary<NSString *, id> *)context {
|
||||||
|
SDInternalSetImageBlock internalSetImageBlock;
|
||||||
|
if (setImageBlock) {
|
||||||
|
internalSetImageBlock = ^(UIImage * _Nullable image, NSData * _Nullable imageData, SDImageCacheType cacheType, NSURL * _Nullable imageURL) {
|
||||||
|
if (setImageBlock) {
|
||||||
|
setImageBlock(image, imageData);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
[self sd_internalSetImageWithURL:url placeholderImage:placeholder options:options operationKey:operationKey internalSetImageBlock:internalSetImageBlock progress:progressBlock completed:completedBlock context:context];
|
||||||
|
}
|
||||||
|
|
||||||
|
- (void)sd_internalSetImageWithURL:(nullable NSURL *)url
|
||||||
|
placeholderImage:(nullable UIImage *)placeholder
|
||||||
|
options:(SDWebImageOptions)options
|
||||||
|
operationKey:(nullable NSString *)operationKey
|
||||||
|
internalSetImageBlock:(nullable SDInternalSetImageBlock)setImageBlock
|
||||||
|
progress:(nullable SDWebImageDownloaderProgressBlock)progressBlock
|
||||||
|
completed:(nullable SDExternalCompletionBlock)completedBlock
|
||||||
|
context:(nullable NSDictionary<NSString *, id> *)context {
|
||||||
NSString *validOperationKey = operationKey ?: NSStringFromClass([self class]);
|
NSString *validOperationKey = operationKey ?: NSStringFromClass([self class]);
|
||||||
[self sd_cancelImageLoadOperationWithKey:validOperationKey];
|
[self sd_cancelImageLoadOperationWithKey:validOperationKey];
|
||||||
objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
objc_setAssociatedObject(self, &imageURLKey, url, OBJC_ASSOCIATION_RETAIN_NONATOMIC);
|
||||||
@ -70,7 +89,7 @@ static char TAG_ACTIVITY_SHOW;
|
|||||||
dispatch_group_enter(group);
|
dispatch_group_enter(group);
|
||||||
}
|
}
|
||||||
dispatch_main_async_safe(^{
|
dispatch_main_async_safe(^{
|
||||||
[self sd_setImage:placeholder imageData:nil basedOnClassOrViaCustomSetImageBlock:setImageBlock];
|
[self sd_setImage:placeholder imageData:nil basedOnClassOrViaCustomSetImageBlock:setImageBlock cacheType:SDImageCacheTypeNone imageURL:url];
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -157,7 +176,7 @@ static char TAG_ACTIVITY_SHOW;
|
|||||||
#if SD_UIKIT || SD_MAC
|
#if SD_UIKIT || SD_MAC
|
||||||
[sself sd_setImage:targetImage imageData:targetData basedOnClassOrViaCustomSetImageBlock:setImageBlock transition:transition cacheType:cacheType imageURL:imageURL];
|
[sself sd_setImage:targetImage imageData:targetData basedOnClassOrViaCustomSetImageBlock:setImageBlock transition:transition cacheType:cacheType imageURL:imageURL];
|
||||||
#else
|
#else
|
||||||
[sself sd_setImage:targetImage imageData:targetData basedOnClassOrViaCustomSetImageBlock:setImageBlock];
|
[sself sd_setImage:targetImage imageData:targetData basedOnClassOrViaCustomSetImageBlock:setImageBlock cacheType:cacheType imageURL:imageURL];
|
||||||
#endif
|
#endif
|
||||||
if (group) {
|
if (group) {
|
||||||
// compatible code for FLAnimatedImage, because we assume completedBlock called after image was set. This will be removed in 5.x
|
// compatible code for FLAnimatedImage, because we assume completedBlock called after image was set. This will be removed in 5.x
|
||||||
@ -190,13 +209,13 @@ static char TAG_ACTIVITY_SHOW;
|
|||||||
[self sd_cancelImageLoadOperationWithKey:NSStringFromClass([self class])];
|
[self sd_cancelImageLoadOperationWithKey:NSStringFromClass([self class])];
|
||||||
}
|
}
|
||||||
|
|
||||||
- (void)sd_setImage:(UIImage *)image imageData:(NSData *)imageData basedOnClassOrViaCustomSetImageBlock:(SDSetImageBlock)setImageBlock {
|
- (void)sd_setImage:(UIImage *)image imageData:(NSData *)imageData basedOnClassOrViaCustomSetImageBlock:(SDInternalSetImageBlock)setImageBlock cacheType:(SDImageCacheType)cacheType imageURL:(NSURL *)imageURL {
|
||||||
#if SD_UIKIT || SD_MAC
|
#if SD_UIKIT || SD_MAC
|
||||||
[self sd_setImage:image imageData:imageData basedOnClassOrViaCustomSetImageBlock:setImageBlock transition:nil cacheType:0 imageURL:nil];
|
[self sd_setImage:image imageData:imageData basedOnClassOrViaCustomSetImageBlock:setImageBlock transition:nil cacheType:cacheType imageURL:imageURL];
|
||||||
#else
|
#else
|
||||||
// watchOS does not support view transition. Simplify the logic
|
// watchOS does not support view transition. Simplify the logic
|
||||||
if (setImageBlock) {
|
if (setImageBlock) {
|
||||||
setImageBlock(image, imageData);
|
setImageBlock(image, imageData, cacheType, imageURL);
|
||||||
} else if ([self isKindOfClass:[UIImageView class]]) {
|
} else if ([self isKindOfClass:[UIImageView class]]) {
|
||||||
UIImageView *imageView = (UIImageView *)self;
|
UIImageView *imageView = (UIImageView *)self;
|
||||||
[imageView setImage:image];
|
[imageView setImage:image];
|
||||||
@ -205,21 +224,21 @@ static char TAG_ACTIVITY_SHOW;
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if SD_UIKIT || SD_MAC
|
#if SD_UIKIT || SD_MAC
|
||||||
- (void)sd_setImage:(UIImage *)image imageData:(NSData *)imageData basedOnClassOrViaCustomSetImageBlock:(SDSetImageBlock)setImageBlock transition:(SDWebImageTransition *)transition cacheType:(SDImageCacheType)cacheType imageURL:(NSURL *)imageURL {
|
- (void)sd_setImage:(UIImage *)image imageData:(NSData *)imageData basedOnClassOrViaCustomSetImageBlock:(SDInternalSetImageBlock)setImageBlock transition:(SDWebImageTransition *)transition cacheType:(SDImageCacheType)cacheType imageURL:(NSURL *)imageURL {
|
||||||
UIView *view = self;
|
UIView *view = self;
|
||||||
SDSetImageBlock finalSetImageBlock;
|
SDInternalSetImageBlock finalSetImageBlock;
|
||||||
if (setImageBlock) {
|
if (setImageBlock) {
|
||||||
finalSetImageBlock = setImageBlock;
|
finalSetImageBlock = setImageBlock;
|
||||||
} else if ([view isKindOfClass:[UIImageView class]]) {
|
} else if ([view isKindOfClass:[UIImageView class]]) {
|
||||||
UIImageView *imageView = (UIImageView *)view;
|
UIImageView *imageView = (UIImageView *)view;
|
||||||
finalSetImageBlock = ^(UIImage *setImage, NSData *setImageData) {
|
finalSetImageBlock = ^(UIImage *setImage, NSData *setImageData, SDImageCacheType setCacheType, NSURL *setImageURL) {
|
||||||
imageView.image = setImage;
|
imageView.image = setImage;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
#if SD_UIKIT
|
#if SD_UIKIT
|
||||||
else if ([view isKindOfClass:[UIButton class]]) {
|
else if ([view isKindOfClass:[UIButton class]]) {
|
||||||
UIButton *button = (UIButton *)view;
|
UIButton *button = (UIButton *)view;
|
||||||
finalSetImageBlock = ^(UIImage *setImage, NSData *setImageData){
|
finalSetImageBlock = ^(UIImage *setImage, NSData *setImageData, SDImageCacheType setCacheType, NSURL *setImageURL) {
|
||||||
[button setImage:setImage forState:UIControlStateNormal];
|
[button setImage:setImage forState:UIControlStateNormal];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -235,7 +254,7 @@ static char TAG_ACTIVITY_SHOW;
|
|||||||
} completion:^(BOOL finished) {
|
} completion:^(BOOL finished) {
|
||||||
[UIView transitionWithView:view duration:transition.duration options:transition.animationOptions animations:^{
|
[UIView transitionWithView:view duration:transition.duration options:transition.animationOptions animations:^{
|
||||||
if (finalSetImageBlock && !transition.avoidAutoSetImage) {
|
if (finalSetImageBlock && !transition.avoidAutoSetImage) {
|
||||||
finalSetImageBlock(image, imageData);
|
finalSetImageBlock(image, imageData, cacheType, imageURL);
|
||||||
}
|
}
|
||||||
if (transition.animations) {
|
if (transition.animations) {
|
||||||
transition.animations(view, image);
|
transition.animations(view, image);
|
||||||
@ -255,7 +274,7 @@ static char TAG_ACTIVITY_SHOW;
|
|||||||
context.timingFunction = transition.timingFunction;
|
context.timingFunction = transition.timingFunction;
|
||||||
context.allowsImplicitAnimation = (transition.animationOptions & SDWebImageAnimationOptionAllowsImplicitAnimation);
|
context.allowsImplicitAnimation = (transition.animationOptions & SDWebImageAnimationOptionAllowsImplicitAnimation);
|
||||||
if (finalSetImageBlock && !transition.avoidAutoSetImage) {
|
if (finalSetImageBlock && !transition.avoidAutoSetImage) {
|
||||||
finalSetImageBlock(image, imageData);
|
finalSetImageBlock(image, imageData, cacheType, imageURL);
|
||||||
}
|
}
|
||||||
if (transition.animations) {
|
if (transition.animations) {
|
||||||
transition.animations(view, image);
|
transition.animations(view, image);
|
||||||
@ -269,7 +288,7 @@ static char TAG_ACTIVITY_SHOW;
|
|||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
if (finalSetImageBlock) {
|
if (finalSetImageBlock) {
|
||||||
finalSetImageBlock(image, imageData);
|
finalSetImageBlock(image, imageData, cacheType, imageURL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,9 +2,9 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppCenter/AppCenter-SDK-Appl
|
|||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/Base64" "${PODS_ROOT}/Headers/Public/CodePush" "${PODS_ROOT}/Headers/Public/DoubleConversion" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/JWT" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/glog" "${PODS_ROOT}/Headers/Public/react-native-fast-image" "${PODS_ROOT}/Headers/Public/react-native-version-number" "${PODS_ROOT}/Headers/Public/yoga"
|
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/Base64" "${PODS_ROOT}/Headers/Public/CodePush" "${PODS_ROOT}/Headers/Public/DoubleConversion" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/JWT" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/glog" "${PODS_ROOT}/Headers/Public/react-native-fast-image" "${PODS_ROOT}/Headers/Public/react-native-version-number" "${PODS_ROOT}/Headers/Public/yoga"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Base64" "${PODS_CONFIGURATION_BUILD_DIR}/CodePush" "${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion" "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage" "${PODS_CONFIGURATION_BUILD_DIR}/Folly" "${PODS_CONFIGURATION_BUILD_DIR}/JWT" "${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController" "${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker" "${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/glog" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-fast-image" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-version-number" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
|
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Base64" "${PODS_CONFIGURATION_BUILD_DIR}/CodePush" "${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion" "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage" "${PODS_CONFIGURATION_BUILD_DIR}/Folly" "${PODS_CONFIGURATION_BUILD_DIR}/JWT" "${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController" "${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker" "${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/glog" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-fast-image" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-version-number" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
|
||||||
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AppCenter" -isystem "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" -isystem "${PODS_ROOT}/Headers/Public/Base64" -isystem "${PODS_ROOT}/Headers/Public/CodePush" -isystem "${PODS_ROOT}/Headers/Public/DoubleConversion" -isystem "${PODS_ROOT}/Headers/Public/FLAnimatedImage" -isystem "${PODS_ROOT}/Headers/Public/JWT" -isystem "${PODS_ROOT}/Headers/Public/QBImagePickerController" -isystem "${PODS_ROOT}/Headers/Public/RNImageCropPicker" -isystem "${PODS_ROOT}/Headers/Public/RSKImageCropper" -isystem "${PODS_ROOT}/Headers/Public/React" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SSZipArchive" -isystem "${PODS_ROOT}/Headers/Public/glog" -isystem "${PODS_ROOT}/Headers/Public/react-native-fast-image" -isystem "${PODS_ROOT}/Headers/Public/react-native-version-number" -isystem "${PODS_ROOT}/Headers/Public/yoga"
|
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_ROOT}/Headers/Public/SDWebImage/SDWebImage.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AppCenter" -isystem "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" -isystem "${PODS_ROOT}/Headers/Public/Base64" -isystem "${PODS_ROOT}/Headers/Public/CodePush" -isystem "${PODS_ROOT}/Headers/Public/DoubleConversion" -isystem "${PODS_ROOT}/Headers/Public/FLAnimatedImage" -isystem "${PODS_ROOT}/Headers/Public/JWT" -isystem "${PODS_ROOT}/Headers/Public/QBImagePickerController" -isystem "${PODS_ROOT}/Headers/Public/RNImageCropPicker" -isystem "${PODS_ROOT}/Headers/Public/RSKImageCropper" -isystem "${PODS_ROOT}/Headers/Public/React" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SSZipArchive" -isystem "${PODS_ROOT}/Headers/Public/glog" -isystem "${PODS_ROOT}/Headers/Public/react-native-fast-image" -isystem "${PODS_ROOT}/Headers/Public/react-native-version-number" -isystem "${PODS_ROOT}/Headers/Public/yoga"
|
||||||
OTHER_LDFLAGS = $(inherited) -ObjC -l"Base64" -l"CodePush" -l"DoubleConversion" -l"FLAnimatedImage" -l"Folly" -l"JWT" -l"QBImagePickerController" -l"RNImageCropPicker" -l"RSKImageCropper" -l"React" -l"SDWebImage" -l"SSZipArchive" -l"c++" -l"glog" -l"react-native-fast-image" -l"react-native-version-number" -l"sqlite3" -l"stdc++" -l"yoga" -l"z" -framework "AppCenter" -framework "AppCenterAnalytics" -framework "AppCenterCrashes" -framework "AppCenterPush" -framework "AppCenterReactNativeShared" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "ImageIO" -framework "JavaScriptCore" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "UserNotifications"
|
OTHER_LDFLAGS = $(inherited) -ObjC -l"Base64" -l"CodePush" -l"DoubleConversion" -l"FLAnimatedImage" -l"Folly" -l"JWT" -l"QBImagePickerController" -l"RNImageCropPicker" -l"RSKImageCropper" -l"React" -l"SDWebImage" -l"SSZipArchive" -l"c++" -l"glog" -l"react-native-fast-image" -l"react-native-version-number" -l"sqlite3" -l"stdc++" -l"yoga" -l"z" -framework "AppCenter" -framework "AppCenterAnalytics" -framework "AppCenterCrashes" -framework "AppCenterPush" -framework "AppCenterReactNativeShared" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "ImageIO" -framework "JavaScriptCore" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "UserNotifications"
|
||||||
OTHER_SWIFT_FLAGS = $(inherited) -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
OTHER_SWIFT_FLAGS = $(inherited) -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SDWebImage/SDWebImage.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||||
|
@ -2,9 +2,9 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppCenter/AppCenter-SDK-Appl
|
|||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/Base64" "${PODS_ROOT}/Headers/Public/CodePush" "${PODS_ROOT}/Headers/Public/DoubleConversion" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/JWT" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/glog" "${PODS_ROOT}/Headers/Public/react-native-fast-image" "${PODS_ROOT}/Headers/Public/react-native-version-number" "${PODS_ROOT}/Headers/Public/yoga"
|
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/Base64" "${PODS_ROOT}/Headers/Public/CodePush" "${PODS_ROOT}/Headers/Public/DoubleConversion" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/JWT" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/glog" "${PODS_ROOT}/Headers/Public/react-native-fast-image" "${PODS_ROOT}/Headers/Public/react-native-version-number" "${PODS_ROOT}/Headers/Public/yoga"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Base64" "${PODS_CONFIGURATION_BUILD_DIR}/CodePush" "${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion" "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage" "${PODS_CONFIGURATION_BUILD_DIR}/Folly" "${PODS_CONFIGURATION_BUILD_DIR}/JWT" "${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController" "${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker" "${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/glog" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-fast-image" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-version-number" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
|
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Base64" "${PODS_CONFIGURATION_BUILD_DIR}/CodePush" "${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion" "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage" "${PODS_CONFIGURATION_BUILD_DIR}/Folly" "${PODS_CONFIGURATION_BUILD_DIR}/JWT" "${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController" "${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker" "${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/glog" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-fast-image" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-version-number" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
|
||||||
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AppCenter" -isystem "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" -isystem "${PODS_ROOT}/Headers/Public/Base64" -isystem "${PODS_ROOT}/Headers/Public/CodePush" -isystem "${PODS_ROOT}/Headers/Public/DoubleConversion" -isystem "${PODS_ROOT}/Headers/Public/FLAnimatedImage" -isystem "${PODS_ROOT}/Headers/Public/JWT" -isystem "${PODS_ROOT}/Headers/Public/QBImagePickerController" -isystem "${PODS_ROOT}/Headers/Public/RNImageCropPicker" -isystem "${PODS_ROOT}/Headers/Public/RSKImageCropper" -isystem "${PODS_ROOT}/Headers/Public/React" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SSZipArchive" -isystem "${PODS_ROOT}/Headers/Public/glog" -isystem "${PODS_ROOT}/Headers/Public/react-native-fast-image" -isystem "${PODS_ROOT}/Headers/Public/react-native-version-number" -isystem "${PODS_ROOT}/Headers/Public/yoga"
|
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_ROOT}/Headers/Public/SDWebImage/SDWebImage.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap" -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AppCenter" -isystem "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" -isystem "${PODS_ROOT}/Headers/Public/Base64" -isystem "${PODS_ROOT}/Headers/Public/CodePush" -isystem "${PODS_ROOT}/Headers/Public/DoubleConversion" -isystem "${PODS_ROOT}/Headers/Public/FLAnimatedImage" -isystem "${PODS_ROOT}/Headers/Public/JWT" -isystem "${PODS_ROOT}/Headers/Public/QBImagePickerController" -isystem "${PODS_ROOT}/Headers/Public/RNImageCropPicker" -isystem "${PODS_ROOT}/Headers/Public/RSKImageCropper" -isystem "${PODS_ROOT}/Headers/Public/React" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SSZipArchive" -isystem "${PODS_ROOT}/Headers/Public/glog" -isystem "${PODS_ROOT}/Headers/Public/react-native-fast-image" -isystem "${PODS_ROOT}/Headers/Public/react-native-version-number" -isystem "${PODS_ROOT}/Headers/Public/yoga"
|
||||||
OTHER_LDFLAGS = $(inherited) -ObjC -l"Base64" -l"CodePush" -l"DoubleConversion" -l"FLAnimatedImage" -l"Folly" -l"JWT" -l"QBImagePickerController" -l"RNImageCropPicker" -l"RSKImageCropper" -l"React" -l"SDWebImage" -l"SSZipArchive" -l"c++" -l"glog" -l"react-native-fast-image" -l"react-native-version-number" -l"sqlite3" -l"stdc++" -l"yoga" -l"z" -framework "AppCenter" -framework "AppCenterAnalytics" -framework "AppCenterCrashes" -framework "AppCenterPush" -framework "AppCenterReactNativeShared" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "ImageIO" -framework "JavaScriptCore" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "UserNotifications"
|
OTHER_LDFLAGS = $(inherited) -ObjC -l"Base64" -l"CodePush" -l"DoubleConversion" -l"FLAnimatedImage" -l"Folly" -l"JWT" -l"QBImagePickerController" -l"RNImageCropPicker" -l"RSKImageCropper" -l"React" -l"SDWebImage" -l"SSZipArchive" -l"c++" -l"glog" -l"react-native-fast-image" -l"react-native-version-number" -l"sqlite3" -l"stdc++" -l"yoga" -l"z" -framework "AppCenter" -framework "AppCenterAnalytics" -framework "AppCenterCrashes" -framework "AppCenterPush" -framework "AppCenterReactNativeShared" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "ImageIO" -framework "JavaScriptCore" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "UserNotifications"
|
||||||
OTHER_SWIFT_FLAGS = $(inherited) -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
OTHER_SWIFT_FLAGS = $(inherited) -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SDWebImage/SDWebImage.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||||
|
@ -2,9 +2,9 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppCenter/AppCenter-SDK-Appl
|
|||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/Base64" "${PODS_ROOT}/Headers/Public/CodePush" "${PODS_ROOT}/Headers/Public/DoubleConversion" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/JWT" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/glog" "${PODS_ROOT}/Headers/Public/react-native-fast-image" "${PODS_ROOT}/Headers/Public/react-native-version-number" "${PODS_ROOT}/Headers/Public/yoga"
|
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/Base64" "${PODS_ROOT}/Headers/Public/CodePush" "${PODS_ROOT}/Headers/Public/DoubleConversion" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/JWT" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/glog" "${PODS_ROOT}/Headers/Public/react-native-fast-image" "${PODS_ROOT}/Headers/Public/react-native-version-number" "${PODS_ROOT}/Headers/Public/yoga"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Base64" "${PODS_CONFIGURATION_BUILD_DIR}/CodePush" "${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion" "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage" "${PODS_CONFIGURATION_BUILD_DIR}/Folly" "${PODS_CONFIGURATION_BUILD_DIR}/JWT" "${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController" "${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker" "${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/glog" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-fast-image" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-version-number" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
|
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Base64" "${PODS_CONFIGURATION_BUILD_DIR}/CodePush" "${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion" "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage" "${PODS_CONFIGURATION_BUILD_DIR}/Folly" "${PODS_CONFIGURATION_BUILD_DIR}/JWT" "${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController" "${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker" "${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/glog" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-fast-image" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-version-number" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
|
||||||
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AppCenter" -isystem "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" -isystem "${PODS_ROOT}/Headers/Public/Base64" -isystem "${PODS_ROOT}/Headers/Public/CodePush" -isystem "${PODS_ROOT}/Headers/Public/DoubleConversion" -isystem "${PODS_ROOT}/Headers/Public/FLAnimatedImage" -isystem "${PODS_ROOT}/Headers/Public/JWT" -isystem "${PODS_ROOT}/Headers/Public/QBImagePickerController" -isystem "${PODS_ROOT}/Headers/Public/RNImageCropPicker" -isystem "${PODS_ROOT}/Headers/Public/RSKImageCropper" -isystem "${PODS_ROOT}/Headers/Public/React" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SSZipArchive" -isystem "${PODS_ROOT}/Headers/Public/glog" -isystem "${PODS_ROOT}/Headers/Public/react-native-fast-image" -isystem "${PODS_ROOT}/Headers/Public/react-native-version-number" -isystem "${PODS_ROOT}/Headers/Public/yoga" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AppCenter" -isystem "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" -isystem "${PODS_ROOT}/Headers/Public/Base64" -isystem "${PODS_ROOT}/Headers/Public/CodePush" -isystem "${PODS_ROOT}/Headers/Public/DoubleConversion" -isystem "${PODS_ROOT}/Headers/Public/FLAnimatedImage" -isystem "${PODS_ROOT}/Headers/Public/JWT" -isystem "${PODS_ROOT}/Headers/Public/QBImagePickerController" -isystem "${PODS_ROOT}/Headers/Public/RNImageCropPicker" -isystem "${PODS_ROOT}/Headers/Public/RSKImageCropper" -isystem "${PODS_ROOT}/Headers/Public/React" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SSZipArchive" -isystem "${PODS_ROOT}/Headers/Public/glog" -isystem "${PODS_ROOT}/Headers/Public/react-native-fast-image" -isystem "${PODS_ROOT}/Headers/Public/react-native-version-number" -isystem "${PODS_ROOT}/Headers/Public/yoga" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SDWebImage/SDWebImage.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
||||||
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"sqlite3" -l"stdc++" -l"z" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "ImageIO" -framework "JavaScriptCore" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "UserNotifications"
|
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"sqlite3" -l"stdc++" -l"z" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "ImageIO" -framework "JavaScriptCore" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "UserNotifications"
|
||||||
OTHER_SWIFT_FLAGS = $(inherited) -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
OTHER_SWIFT_FLAGS = $(inherited) -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SDWebImage/SDWebImage.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||||
|
@ -2,9 +2,9 @@ FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/AppCenter/AppCenter-SDK-Appl
|
|||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/Base64" "${PODS_ROOT}/Headers/Public/CodePush" "${PODS_ROOT}/Headers/Public/DoubleConversion" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/JWT" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/glog" "${PODS_ROOT}/Headers/Public/react-native-fast-image" "${PODS_ROOT}/Headers/Public/react-native-version-number" "${PODS_ROOT}/Headers/Public/yoga"
|
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/AppCenter" "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" "${PODS_ROOT}/Headers/Public/Base64" "${PODS_ROOT}/Headers/Public/CodePush" "${PODS_ROOT}/Headers/Public/DoubleConversion" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/JWT" "${PODS_ROOT}/Headers/Public/QBImagePickerController" "${PODS_ROOT}/Headers/Public/RNImageCropPicker" "${PODS_ROOT}/Headers/Public/RSKImageCropper" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/SSZipArchive" "${PODS_ROOT}/Headers/Public/glog" "${PODS_ROOT}/Headers/Public/react-native-fast-image" "${PODS_ROOT}/Headers/Public/react-native-version-number" "${PODS_ROOT}/Headers/Public/yoga"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Base64" "${PODS_CONFIGURATION_BUILD_DIR}/CodePush" "${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion" "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage" "${PODS_CONFIGURATION_BUILD_DIR}/Folly" "${PODS_CONFIGURATION_BUILD_DIR}/JWT" "${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController" "${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker" "${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/glog" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-fast-image" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-version-number" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
|
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Base64" "${PODS_CONFIGURATION_BUILD_DIR}/CodePush" "${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion" "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage" "${PODS_CONFIGURATION_BUILD_DIR}/Folly" "${PODS_CONFIGURATION_BUILD_DIR}/JWT" "${PODS_CONFIGURATION_BUILD_DIR}/QBImagePickerController" "${PODS_CONFIGURATION_BUILD_DIR}/RNImageCropPicker" "${PODS_CONFIGURATION_BUILD_DIR}/RSKImageCropper" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/SSZipArchive" "${PODS_CONFIGURATION_BUILD_DIR}/glog" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-fast-image" "${PODS_CONFIGURATION_BUILD_DIR}/react-native-version-number" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
|
||||||
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AppCenter" -isystem "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" -isystem "${PODS_ROOT}/Headers/Public/Base64" -isystem "${PODS_ROOT}/Headers/Public/CodePush" -isystem "${PODS_ROOT}/Headers/Public/DoubleConversion" -isystem "${PODS_ROOT}/Headers/Public/FLAnimatedImage" -isystem "${PODS_ROOT}/Headers/Public/JWT" -isystem "${PODS_ROOT}/Headers/Public/QBImagePickerController" -isystem "${PODS_ROOT}/Headers/Public/RNImageCropPicker" -isystem "${PODS_ROOT}/Headers/Public/RSKImageCropper" -isystem "${PODS_ROOT}/Headers/Public/React" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SSZipArchive" -isystem "${PODS_ROOT}/Headers/Public/glog" -isystem "${PODS_ROOT}/Headers/Public/react-native-fast-image" -isystem "${PODS_ROOT}/Headers/Public/react-native-version-number" -isystem "${PODS_ROOT}/Headers/Public/yoga" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
OTHER_CFLAGS = $(inherited) -isystem "${PODS_ROOT}/Headers/Public" -isystem "${PODS_ROOT}/Headers/Public/AppCenter" -isystem "${PODS_ROOT}/Headers/Public/AppCenterReactNativeShared" -isystem "${PODS_ROOT}/Headers/Public/Base64" -isystem "${PODS_ROOT}/Headers/Public/CodePush" -isystem "${PODS_ROOT}/Headers/Public/DoubleConversion" -isystem "${PODS_ROOT}/Headers/Public/FLAnimatedImage" -isystem "${PODS_ROOT}/Headers/Public/JWT" -isystem "${PODS_ROOT}/Headers/Public/QBImagePickerController" -isystem "${PODS_ROOT}/Headers/Public/RNImageCropPicker" -isystem "${PODS_ROOT}/Headers/Public/RSKImageCropper" -isystem "${PODS_ROOT}/Headers/Public/React" -isystem "${PODS_ROOT}/Headers/Public/SDWebImage" -isystem "${PODS_ROOT}/Headers/Public/SSZipArchive" -isystem "${PODS_ROOT}/Headers/Public/glog" -isystem "${PODS_ROOT}/Headers/Public/react-native-fast-image" -isystem "${PODS_ROOT}/Headers/Public/react-native-version-number" -isystem "${PODS_ROOT}/Headers/Public/yoga" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SDWebImage/SDWebImage.modulemap" -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
||||||
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"sqlite3" -l"stdc++" -l"z" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "ImageIO" -framework "JavaScriptCore" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "UserNotifications"
|
OTHER_LDFLAGS = $(inherited) -ObjC -l"c++" -l"sqlite3" -l"stdc++" -l"z" -framework "CoreGraphics" -framework "CoreTelephony" -framework "Foundation" -framework "ImageIO" -framework "JavaScriptCore" -framework "MobileCoreServices" -framework "Photos" -framework "QuartzCore" -framework "Security" -framework "SystemConfiguration" -framework "UIKit" -weak_framework "UserNotifications"
|
||||||
OTHER_SWIFT_FLAGS = $(inherited) -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
OTHER_SWIFT_FLAGS = $(inherited) -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SDWebImage/SDWebImage.modulemap" -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SSZipArchive/SSZipArchive.modulemap"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage
|
CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage
|
||||||
|
DEFINES_MODULE = YES
|
||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/SDWebImage"
|
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/SDWebImage" "${PODS_ROOT}/Headers/Public"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage"
|
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage"
|
||||||
OTHER_LDFLAGS = -framework "ImageIO"
|
OTHER_LDFLAGS = -framework "ImageIO"
|
||||||
|
OTHER_SWIFT_FLAGS = $(inherited) -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
|
@ -2,7 +2,9 @@ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/react-native-fast-imag
|
|||||||
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
|
||||||
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/react-native-fast-image" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DoubleConversion" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/glog" "${PODS_ROOT}/Headers/Public/react-native-fast-image" "${PODS_ROOT}/Headers/Public/yoga"
|
HEADER_SEARCH_PATHS = $(inherited) "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Private/react-native-fast-image" "${PODS_ROOT}/Headers/Public" "${PODS_ROOT}/Headers/Public/DoubleConversion" "${PODS_ROOT}/Headers/Public/FLAnimatedImage" "${PODS_ROOT}/Headers/Public/React" "${PODS_ROOT}/Headers/Public/SDWebImage" "${PODS_ROOT}/Headers/Public/glog" "${PODS_ROOT}/Headers/Public/react-native-fast-image" "${PODS_ROOT}/Headers/Public/yoga"
|
||||||
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion" "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage" "${PODS_CONFIGURATION_BUILD_DIR}/Folly" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/glog" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
|
LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/DoubleConversion" "${PODS_CONFIGURATION_BUILD_DIR}/FLAnimatedImage" "${PODS_CONFIGURATION_BUILD_DIR}/Folly" "${PODS_CONFIGURATION_BUILD_DIR}/React" "${PODS_CONFIGURATION_BUILD_DIR}/SDWebImage" "${PODS_CONFIGURATION_BUILD_DIR}/glog" "${PODS_CONFIGURATION_BUILD_DIR}/yoga"
|
||||||
|
OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_ROOT}/Headers/Public/SDWebImage/SDWebImage.modulemap"
|
||||||
OTHER_LDFLAGS = -framework "UIKit"
|
OTHER_LDFLAGS = -framework "UIKit"
|
||||||
|
OTHER_SWIFT_FLAGS = $(inherited) -Xcc -fmodule-map-file="${PODS_ROOT}/Headers/Public/SDWebImage/SDWebImage.modulemap"
|
||||||
PODS_BUILD_DIR = ${BUILD_DIR}
|
PODS_BUILD_DIR = ${BUILD_DIR}
|
||||||
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
|
||||||
PODS_ROOT = ${SRCROOT}
|
PODS_ROOT = ${SRCROOT}
|
||||||
|
@ -1707,7 +1707,7 @@
|
|||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
shellPath = /bin/sh;
|
shellPath = /bin/sh;
|
||||||
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh";
|
shellScript = "export NODE_BINARY=node\n../node_modules/react-native/scripts/react-native-xcode.sh\n";
|
||||||
};
|
};
|
||||||
113EEBCD594A2DC02B68990D /* [CP] Check Pods Manifest.lock */ = {
|
113EEBCD594A2DC02B68990D /* [CP] Check Pods Manifest.lock */ = {
|
||||||
isa = PBXShellScriptBuildPhase;
|
isa = PBXShellScriptBuildPhase;
|
||||||
|
Binary file not shown.
@ -32,12 +32,13 @@
|
|||||||
"buffer": "^5.2.1",
|
"buffer": "^5.2.1",
|
||||||
"core-js": "^2.6.0",
|
"core-js": "^2.6.0",
|
||||||
"crypto-js": "^3.1.9-1",
|
"crypto-js": "^3.1.9-1",
|
||||||
|
"currency-symbol-map": "^4.0.4",
|
||||||
"diff-match-patch": "^1.0.4",
|
"diff-match-patch": "^1.0.4",
|
||||||
"dsteem": "^0.10.1",
|
"dsteem": "^0.10.1",
|
||||||
"intl": "^1.2.5",
|
"intl": "^1.2.5",
|
||||||
"jsc-android": "^236355.1.1",
|
"jsc-android": "^236355.1.1",
|
||||||
"moment": "^2.22.2",
|
"moment": "^2.22.2",
|
||||||
"react": "^16.6.0-alpha.8af6728",
|
"react": "^16.7.0",
|
||||||
"react-intl": "^2.7.2",
|
"react-intl": "^2.7.2",
|
||||||
"react-native": "^0.57.5",
|
"react-native": "^0.57.5",
|
||||||
"react-native-actionsheet": "^2.4.2",
|
"react-native-actionsheet": "^2.4.2",
|
||||||
|
@ -4,7 +4,7 @@ import { TouchableWithoutFeedback, Text, View } from 'react-native';
|
|||||||
import styles from './textButtonStyles';
|
import styles from './textButtonStyles';
|
||||||
|
|
||||||
const TextButtonView = ({
|
const TextButtonView = ({
|
||||||
text, onPress, style, textStyle,
|
text, onPress, style, textStyle, isHasChild,
|
||||||
}) => (
|
}) => (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<TouchableWithoutFeedback style={[styles.button]} onPress={() => onPress && onPress()}>
|
<TouchableWithoutFeedback style={[styles.button]} onPress={() => onPress && onPress()}>
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
import React, { Fragment } from 'react';
|
||||||
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
const FormattedCurrency = ({ value, fixAt = 5, currency }) => {
|
||||||
|
const { currencyRate, currencySymbol } = currency;
|
||||||
|
const valueInCurrency = value * currencyRate;
|
||||||
|
const toFixedValue = valueInCurrency.toFixed(fixAt);
|
||||||
|
|
||||||
|
return <Fragment key="result-val">{`${currencySymbol} ${toFixedValue}`}</Fragment>;
|
||||||
|
};
|
||||||
|
|
||||||
|
const mapStateToProps = state => ({
|
||||||
|
currency: state.application.currency,
|
||||||
|
});
|
||||||
|
|
||||||
|
export default connect(mapStateToProps)(FormattedCurrency);
|
3
src/components/formatedElements/index.js
Normal file
3
src/components/formatedElements/index.js
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
import FormatedCurrency from './formattedCurrency/formattedCurrencyView';
|
||||||
|
|
||||||
|
export { FormatedCurrency };
|
@ -95,10 +95,10 @@ class PostDropdownContainer extends PureComponent {
|
|||||||
|
|
||||||
_share = () => {
|
_share = () => {
|
||||||
const { content } = this.props;
|
const { content } = this.props;
|
||||||
|
const postUrl = getPostUrl(content.url);
|
||||||
|
|
||||||
Share.share({
|
Share.share({
|
||||||
message: content.title,
|
message: `${content.title} ${postUrl}`,
|
||||||
url: getPostUrl(content.url),
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -168,7 +168,7 @@ class PostDropdownContainer extends PureComponent {
|
|||||||
const { intl, currentAccount, content } = this.props;
|
const { intl, currentAccount, content } = this.props;
|
||||||
let _OPTIONS = OPTIONS;
|
let _OPTIONS = OPTIONS;
|
||||||
|
|
||||||
if (content.author === currentAccount.name) {
|
if (content && content.author === currentAccount.name) {
|
||||||
_OPTIONS = OPTIONS.filter(item => item !== 'reblog');
|
_OPTIONS = OPTIONS.filter(item => item !== 'reblog');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,7 +128,7 @@ class PostDisplayView extends PureComponent {
|
|||||||
<PostPlaceHolder />
|
<PostPlaceHolder />
|
||||||
) : (
|
) : (
|
||||||
<View onLayout={event => this._handleOnPostLayout(event)}>
|
<View onLayout={event => this._handleOnPostLayout(event)}>
|
||||||
<Text style={styles.title}>{post.title || "Not Found"}</Text>
|
{!!post.title && <Text style={styles.title}>{post.title}</Text>}
|
||||||
<PostHeaderDescription
|
<PostHeaderDescription
|
||||||
date={formatedTime}
|
date={formatedTime}
|
||||||
name={post.author}
|
name={post.author}
|
||||||
|
@ -28,6 +28,7 @@ export default EStyleSheet.create({
|
|||||||
marginTop: 15,
|
marginTop: 15,
|
||||||
minWidth: 192,
|
minWidth: 192,
|
||||||
width: 192,
|
width: 192,
|
||||||
|
maxHeight: '$deviceHeight - 200',
|
||||||
},
|
},
|
||||||
dropdownButtonStyle: {
|
dropdownButtonStyle: {
|
||||||
backgroundColor: '$primaryGray',
|
backgroundColor: '$primaryGray',
|
||||||
|
@ -14,6 +14,7 @@ import { vestsToRshares } from '../../../utils/conversions';
|
|||||||
import { Icon } from '../../icon';
|
import { Icon } from '../../icon';
|
||||||
import { PulseAnimation } from '../../animations';
|
import { PulseAnimation } from '../../animations';
|
||||||
import { TextButton } from '../../buttons';
|
import { TextButton } from '../../buttons';
|
||||||
|
import { FormatedCurrency } from '../../formatedElements';
|
||||||
|
|
||||||
// STEEM
|
// STEEM
|
||||||
import { vote } from '../../../providers/steem/dsteem';
|
import { vote } from '../../../providers/steem/dsteem';
|
||||||
@ -203,7 +204,7 @@ class UpvoteView extends Component {
|
|||||||
<TextButton
|
<TextButton
|
||||||
style={styles.payoutTextButton}
|
style={styles.payoutTextButton}
|
||||||
textStyle={[styles.payoutValue, isDecinedPayout && styles.declinedPayout]}
|
textStyle={[styles.payoutValue, isDecinedPayout && styles.declinedPayout]}
|
||||||
text={`$${_totalPayout}`}
|
text={<FormatedCurrency value={_totalPayout} />}
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
openPopover();
|
openPopover();
|
||||||
this.setState({ isShowDetails: true });
|
this.setState({ isShowDetails: true });
|
||||||
@ -258,18 +259,18 @@ class UpvoteView extends Component {
|
|||||||
<Fragment>
|
<Fragment>
|
||||||
<TouchableOpacity
|
<TouchableOpacity
|
||||||
onPress={() => {
|
onPress={() => {
|
||||||
closePopover();
|
closePopover();
|
||||||
this._upvoteContent();
|
this._upvoteContent();
|
||||||
}}
|
}}
|
||||||
style={styles.upvoteButton}
|
style={styles.upvoteButton}
|
||||||
>
|
>
|
||||||
<Icon
|
<Icon
|
||||||
size={20}
|
size={20}
|
||||||
style={[styles.upvoteIcon, { color: '#007ee5' }]}
|
style={[styles.upvoteIcon, { color: '#007ee5' }]}
|
||||||
active={!isLoggedIn}
|
active={!isLoggedIn}
|
||||||
iconType={iconType}
|
iconType={iconType}
|
||||||
name={iconName}
|
name={iconName}
|
||||||
/>
|
/>
|
||||||
</TouchableOpacity>
|
</TouchableOpacity>
|
||||||
<Text style={styles.amount}>{_amount}</Text>
|
<Text style={styles.amount}>{_amount}</Text>
|
||||||
<Slider
|
<Slider
|
||||||
@ -280,10 +281,10 @@ class UpvoteView extends Component {
|
|||||||
thumbTintColor="#007ee5"
|
thumbTintColor="#007ee5"
|
||||||
value={sliderValue}
|
value={sliderValue}
|
||||||
onValueChange={(value) => {
|
onValueChange={(value) => {
|
||||||
this.setState({ sliderValue: value }, () => {
|
this.setState({ sliderValue: value }, () => {
|
||||||
this._calculateEstimatedAmount();
|
this._calculateEstimatedAmount();
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<Text style={styles.percent}>{_percent}</Text>
|
<Text style={styles.percent}>{_percent}</Text>
|
||||||
</Fragment>
|
</Fragment>
|
||||||
|
@ -1,56 +1,53 @@
|
|||||||
export default ['BTC', 'USD'];
|
export default [
|
||||||
|
'BTC',
|
||||||
|
'USD',
|
||||||
|
'EUR',
|
||||||
|
'RUB',
|
||||||
|
'GBP',
|
||||||
|
'JPY',
|
||||||
|
'KRW',
|
||||||
|
'INR',
|
||||||
|
'CNY',
|
||||||
|
'UAH',
|
||||||
|
'SEK',
|
||||||
|
'TRY',
|
||||||
|
'CAD',
|
||||||
|
'CHF',
|
||||||
|
'AUD',
|
||||||
|
'NOK',
|
||||||
|
'PLN',
|
||||||
|
'PHP',
|
||||||
|
'IDR',
|
||||||
|
'ZAR',
|
||||||
|
'THB',
|
||||||
|
'PKR',
|
||||||
|
'VND',
|
||||||
|
'NGN',
|
||||||
|
];
|
||||||
|
|
||||||
export const VALUE = ['btc', 'usd'];
|
export const VALUE = [
|
||||||
// export default [
|
'btc',
|
||||||
// 'BTC',
|
'usd',
|
||||||
// 'USD',
|
'eur',
|
||||||
// 'EUR',
|
'rub',
|
||||||
// 'RUB',
|
'gbp',
|
||||||
// 'GBP',
|
'jpy',
|
||||||
// 'JPY',
|
'krw',
|
||||||
// 'KRW',
|
'inr',
|
||||||
// 'INR',
|
'cny',
|
||||||
// 'CNY',
|
'uah',
|
||||||
// 'UAH',
|
'sek',
|
||||||
// 'SEK',
|
'try',
|
||||||
// 'TRY',
|
'cad',
|
||||||
// 'CAD',
|
'chf',
|
||||||
// 'CHF',
|
'aud',
|
||||||
// 'AUD',
|
'nok',
|
||||||
// 'NOK',
|
'pln',
|
||||||
// 'PLN',
|
'php',
|
||||||
// 'PHP',
|
'idr',
|
||||||
// 'IDR',
|
'zar',
|
||||||
// 'ZAR',
|
'thb',
|
||||||
// 'THB',
|
'pkr',
|
||||||
// 'PKR',
|
'vnd',
|
||||||
// 'VND',
|
'ngn',
|
||||||
// 'NGN'
|
];
|
||||||
// ];
|
|
||||||
|
|
||||||
// export const VALUE = [
|
|
||||||
// 'btc',
|
|
||||||
// 'usd',
|
|
||||||
// 'eur',
|
|
||||||
// 'rub',
|
|
||||||
// 'gbp',
|
|
||||||
// 'jpy',
|
|
||||||
// 'krw',
|
|
||||||
// 'inr',
|
|
||||||
// 'cny',
|
|
||||||
// 'uah',
|
|
||||||
// 'sek',
|
|
||||||
// 'try',
|
|
||||||
// 'cad',
|
|
||||||
// 'chf',
|
|
||||||
// 'aud',
|
|
||||||
// 'nok',
|
|
||||||
// 'pln',
|
|
||||||
// 'php',
|
|
||||||
// 'idr',
|
|
||||||
// 'zar',
|
|
||||||
// 'thb',
|
|
||||||
// 'pkr',
|
|
||||||
// 'vnd',
|
|
||||||
// 'ngn',
|
|
||||||
// ];
|
|
||||||
|
@ -3,6 +3,8 @@ import searchApi from '../../config/search';
|
|||||||
import imageApi from '../../config/imageApi';
|
import imageApi from '../../config/imageApi';
|
||||||
import serverList from '../../config/serverListApi';
|
import serverList from '../../config/serverListApi';
|
||||||
|
|
||||||
|
export const getCurrencyRate = currency => api.get(`/currencyRate/${currency.toUpperCase()}/steem`).then(resp => resp.data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @params username
|
* @params username
|
||||||
*/
|
*/
|
||||||
|
@ -84,7 +84,6 @@ const migration = (oldRealm, newRealm) => {
|
|||||||
// if (oldRealm.schemaVersion < 1) {
|
// if (oldRealm.schemaVersion < 1) {
|
||||||
// const oldObjects = oldRealm.objects('Person');
|
// const oldObjects = oldRealm.objects('Person');
|
||||||
// const newObjects = newRealm.objects('Person');
|
// const newObjects = newRealm.objects('Person');
|
||||||
|
|
||||||
// // loop through all objects and set the name property in the new schema
|
// // loop through all objects and set the name property in the new schema
|
||||||
// for (let i = 0; i < oldObjects.length; i++) {
|
// for (let i = 0; i < oldObjects.length; i++) {
|
||||||
// newObjects[i].name = `${oldObjects[i].firstName} ${oldObjects[i].lastName}`;
|
// newObjects[i].name = `${oldObjects[i].firstName} ${oldObjects[i].lastName}`;
|
||||||
@ -411,10 +410,10 @@ export const setNotificationIsOpen = notificationIsOpen => new Promise((resolve,
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setCurrency = selectedCurrency => new Promise((resolve, reject) => {
|
export const setCurrency = currencyProps => new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
realm.write(() => {
|
realm.write(() => {
|
||||||
settings[0].curreny = selectedCurrency;
|
settings[0].currency = currencyProps;
|
||||||
resolve(true);
|
resolve(true);
|
||||||
});
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
import getSymbolFromCurrency from 'currency-symbol-map';
|
||||||
|
import { getCurrencyRate } from '../../providers/esteem/esteem';
|
||||||
import {
|
import {
|
||||||
ACTIVE_APPLICATION,
|
ACTIVE_APPLICATION,
|
||||||
CLOSE_PIN_CODE_MODAL,
|
CLOSE_PIN_CODE_MODAL,
|
||||||
@ -50,11 +52,6 @@ export const setLanguage = payload => ({
|
|||||||
type: SET_LANGUAGE,
|
type: SET_LANGUAGE,
|
||||||
});
|
});
|
||||||
|
|
||||||
export const setCurrency = payload => ({
|
|
||||||
payload,
|
|
||||||
type: SET_CURRENCY,
|
|
||||||
});
|
|
||||||
|
|
||||||
export const setApi = payload => ({
|
export const setApi = payload => ({
|
||||||
payload,
|
payload,
|
||||||
type: SET_API,
|
type: SET_API,
|
||||||
@ -79,3 +76,15 @@ export const setConnectivityStatus = payload => ({
|
|||||||
payload,
|
payload,
|
||||||
type: IS_CONNECTED,
|
type: IS_CONNECTED,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
/**
|
||||||
|
* MW
|
||||||
|
*/
|
||||||
|
export const setCurrency = currency => (dispatch) => {
|
||||||
|
const currencySymbol = getSymbolFromCurrency(currency);
|
||||||
|
|
||||||
|
getCurrencyRate(currency).then(currencyRate => dispatch({
|
||||||
|
type: SET_CURRENCY,
|
||||||
|
payload: { currency, currencyRate, currencySymbol },
|
||||||
|
}));
|
||||||
|
};
|
||||||
|
@ -17,7 +17,11 @@ import {
|
|||||||
|
|
||||||
const initialState = {
|
const initialState = {
|
||||||
api: 'api.steemit.com',
|
api: 'api.steemit.com',
|
||||||
currency: 'usd',
|
currency: {
|
||||||
|
currency: 'usd',
|
||||||
|
currecyRate: 1,
|
||||||
|
currencySymbol: '$',
|
||||||
|
},
|
||||||
isActive: false,
|
isActive: false,
|
||||||
isConnected: true, // internet connectivity
|
isConnected: true, // internet connectivity
|
||||||
isDarkTheme: false,
|
isDarkTheme: false,
|
||||||
|
@ -116,9 +116,9 @@ class ApplicationContainer extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
_fetchApp = async () => {
|
_fetchApp = async () => {
|
||||||
|
this._refreshGlobalProps();
|
||||||
this._getSettings();
|
this._getSettings();
|
||||||
await this._getUserData();
|
await this._getUserData();
|
||||||
this._refreshGlobalProps();
|
|
||||||
};
|
};
|
||||||
|
|
||||||
_handleConntectionChange = (status) => {
|
_handleConntectionChange = (status) => {
|
||||||
@ -223,17 +223,18 @@ class ApplicationContainer extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
_getSettings = () => {
|
_getSettings = () => {
|
||||||
const { dispatch } = this.props;
|
const { dispatch, actions } = this.props;
|
||||||
|
|
||||||
getSettings().then((response) => {
|
getSettings().then((response) => {
|
||||||
if (response) {
|
if (response) {
|
||||||
if (response.isDarkTheme !== '') dispatch(isDarkTheme(response.isDarkTheme));
|
if (response.isDarkTheme !== '') dispatch(isDarkTheme(response.isDarkTheme));
|
||||||
if (response.language !== '') dispatch(setLanguage(response.language));
|
if (response.language !== '') dispatch(setLanguage(response.language));
|
||||||
if (response.currency !== '') dispatch(setCurrency(response.currency));
|
|
||||||
if (response.notification !== '') dispatch(isNotificationOpen(response.notification));
|
if (response.notification !== '') dispatch(isNotificationOpen(response.notification));
|
||||||
if (response.server !== '') dispatch(setApi(response.server));
|
if (response.server !== '') dispatch(setApi(response.server));
|
||||||
if (response.upvotePercent !== '') dispatch(setUpvotePercent(Number(response.upvotePercent)));
|
if (response.upvotePercent !== '') dispatch(setUpvotePercent(Number(response.upvotePercent)));
|
||||||
|
|
||||||
|
dispatch(setCurrency(response.currency !== '' ? response.currency : 'usd'));
|
||||||
|
|
||||||
this.setState({ isReady: true });
|
this.setState({ isReady: true });
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import React, { Component, Fragment } from 'react';
|
import React, { Component } from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { withNavigation } from 'react-navigation';
|
import { withNavigation } from 'react-navigation';
|
||||||
|
|
||||||
@ -28,9 +28,9 @@ class ProfileContainer extends Component {
|
|||||||
constructor(props) {
|
constructor(props) {
|
||||||
super(props);
|
super(props);
|
||||||
const isReverseHeader = !!(
|
const isReverseHeader = !!(
|
||||||
props.navigation.state &&
|
props.navigation.state
|
||||||
props.navigation.state.params &&
|
&& props.navigation.state.params
|
||||||
props.navigation.state.username
|
&& props.navigation.state.username
|
||||||
);
|
);
|
||||||
|
|
||||||
this.state = {
|
this.state = {
|
||||||
@ -78,8 +78,7 @@ class ProfileContainer extends Component {
|
|||||||
const {
|
const {
|
||||||
navigation, currentAccount, activeBottomTab, isLoggedIn,
|
navigation, currentAccount, activeBottomTab, isLoggedIn,
|
||||||
} = this.props;
|
} = this.props;
|
||||||
const currentUsername = currentAccount.name !== nextProps.currentAccount.name
|
const currentUsername = currentAccount.name !== nextProps.currentAccount.name && nextProps.currentAccount.name;
|
||||||
&& nextProps.currentAccount.name;
|
|
||||||
|
|
||||||
if (isLoggedIn && !nextProps.isLoggedIn) {
|
if (isLoggedIn && !nextProps.isLoggedIn) {
|
||||||
navigation.navigate(ROUTES.SCREENS.LOGIN);
|
navigation.navigate(ROUTES.SCREENS.LOGIN);
|
||||||
@ -328,45 +327,50 @@ class ProfileContainer extends Component {
|
|||||||
user,
|
user,
|
||||||
username,
|
username,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
const { isDarkTheme, isLoggedIn } = this.props;
|
const { isDarkTheme, isLoggedIn, currency } = this.props;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<ProfileScreen
|
||||||
<ProfileScreen
|
about={user && user.about && user.about.profile}
|
||||||
about={user && user.about && user.about.profile}
|
avatar={avatar}
|
||||||
avatar={avatar}
|
comments={comments}
|
||||||
comments={comments}
|
currency={currency}
|
||||||
error={error}
|
error={error}
|
||||||
follows={follows}
|
follows={follows}
|
||||||
handleFollowUnfollowUser={this._handleFollowUnfollowUser}
|
getReplies={() => this._getReplies(username)}
|
||||||
handleMuteUnmuteUser={this._handleMuteUnmuteUser}
|
handleFollowUnfollowUser={this._handleFollowUnfollowUser}
|
||||||
handleOnBackPress={this._handleOnBackPress}
|
handleMuteUnmuteUser={this._handleMuteUnmuteUser}
|
||||||
handleOnFavoritePress={this._handleOnFavoritePress}
|
handleOnBackPress={this._handleOnBackPress}
|
||||||
handleOnFollowsPress={this._handleFollowsPress}
|
handleOnFavoritePress={this._handleOnFavoritePress}
|
||||||
isDarkTheme={isDarkTheme}
|
handleOnFollowsPress={this._handleFollowsPress}
|
||||||
isFavorite={isFavorite}
|
isDarkTheme={isDarkTheme}
|
||||||
isFollowing={isFollowing}
|
isFavorite={isFavorite}
|
||||||
isLoggedIn={isLoggedIn}
|
isFollowing={isFollowing}
|
||||||
isMuted={isMuted}
|
isLoggedIn={isLoggedIn}
|
||||||
isProfileLoading={isProfileLoading}
|
isMuted={isMuted}
|
||||||
isReady={isReady}
|
isProfileLoading={isProfileLoading}
|
||||||
isReverseHeader={isReverseHeader}
|
isReady={isReady}
|
||||||
selectedQuickProfile={selectedQuickProfile}
|
isReverseHeader={isReverseHeader}
|
||||||
selectedUser={user}
|
selectedQuickProfile={selectedQuickProfile}
|
||||||
username={username}
|
selectedUser={user}
|
||||||
getReplies={() => this._getReplies(username)}
|
username={username}
|
||||||
/>
|
/>
|
||||||
</Fragment>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const mapStateToProps = state => ({
|
const mapStateToProps = state => ({
|
||||||
|
// Applicaiton
|
||||||
isLoggedIn: state.application.isLoggedIn,
|
isLoggedIn: state.application.isLoggedIn,
|
||||||
|
isDarkTheme: state.application.isDarkTheme,
|
||||||
|
currency: state.application.currency,
|
||||||
|
|
||||||
|
// Ui
|
||||||
|
activeBottomTab: state.ui.activeBottomTab,
|
||||||
|
|
||||||
|
// Account
|
||||||
currentAccount: state.account.currentAccount,
|
currentAccount: state.account.currentAccount,
|
||||||
pinCode: state.account.pin,
|
pinCode: state.account.pin,
|
||||||
isDarkTheme: state.application.isDarkTheme,
|
|
||||||
activeBottomTab: state.ui.activeBottomTab,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps)(withNavigation(ProfileContainer));
|
export default connect(mapStateToProps)(withNavigation(ProfileContainer));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import React, { PureComponent, Fragment } from 'react';
|
import React, { PureComponent, Fragment } from 'react';
|
||||||
import { View, ScrollView } from 'react-native';
|
import { View, Text, ScrollView } from 'react-native';
|
||||||
import { injectIntl } from 'react-intl';
|
import { injectIntl } from 'react-intl';
|
||||||
|
|
||||||
// Components
|
// Components
|
||||||
@ -16,6 +16,9 @@ import { Posts } from '../../../components/posts';
|
|||||||
import { ProfileSummary } from '../../../components/profileSummary';
|
import { ProfileSummary } from '../../../components/profileSummary';
|
||||||
import { TabBar } from '../../../components/tabBar';
|
import { TabBar } from '../../../components/tabBar';
|
||||||
import { Wallet } from '../../../components/wallet';
|
import { Wallet } from '../../../components/wallet';
|
||||||
|
import { FormatedCurrency } from '../../../components/formatedElements';
|
||||||
|
|
||||||
|
// Constants
|
||||||
import { PROFILE_FILTERS } from '../../../constants/options/filters';
|
import { PROFILE_FILTERS } from '../../../constants/options/filters';
|
||||||
|
|
||||||
// Utilitites
|
// Utilitites
|
||||||
@ -55,13 +58,15 @@ class ProfileScreen extends PureComponent {
|
|||||||
|
|
||||||
_setEstimatedWalletValue = (value) => {
|
_setEstimatedWalletValue = (value) => {
|
||||||
if (value) this.setState({ estimatedWalletValue: value });
|
if (value) this.setState({ estimatedWalletValue: value });
|
||||||
}
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const {
|
const {
|
||||||
about,
|
about,
|
||||||
comments,
|
comments,
|
||||||
|
currency,
|
||||||
follows,
|
follows,
|
||||||
|
getReplies,
|
||||||
handleFollowUnfollowUser,
|
handleFollowUnfollowUser,
|
||||||
handleMuteUnmuteUser,
|
handleMuteUnmuteUser,
|
||||||
handleOnBackPress,
|
handleOnBackPress,
|
||||||
@ -79,11 +84,13 @@ class ProfileScreen extends PureComponent {
|
|||||||
selectedQuickProfile,
|
selectedQuickProfile,
|
||||||
selectedUser,
|
selectedUser,
|
||||||
username,
|
username,
|
||||||
getReplies,
|
|
||||||
} = this.props;
|
} = this.props;
|
||||||
|
|
||||||
const {
|
const {
|
||||||
isSummaryOpen, collapsibleMoreHeight, estimatedWalletValue, oldEstimatedWalletValue,
|
isSummaryOpen,
|
||||||
|
collapsibleMoreHeight,
|
||||||
|
estimatedWalletValue,
|
||||||
|
oldEstimatedWalletValue,
|
||||||
} = this.state;
|
} = this.state;
|
||||||
|
|
||||||
let _about;
|
let _about;
|
||||||
@ -94,6 +101,7 @@ class ProfileScreen extends PureComponent {
|
|||||||
let resourceCredits;
|
let resourceCredits;
|
||||||
let fullInHourVP;
|
let fullInHourVP;
|
||||||
let fullInHourRC;
|
let fullInHourRC;
|
||||||
|
let _estimatedWalletValue;
|
||||||
|
|
||||||
if (selectedUser) {
|
if (selectedUser) {
|
||||||
votingPower = getVotingPower(selectedUser).toFixed(1);
|
votingPower = getVotingPower(selectedUser).toFixed(1);
|
||||||
@ -108,6 +116,14 @@ class ProfileScreen extends PureComponent {
|
|||||||
({ location } = about);
|
({ location } = about);
|
||||||
({ website } = about);
|
({ website } = about);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (estimatedWalletValue) {
|
||||||
|
const { currencyRate, currencySymbol } = currency;
|
||||||
|
_estimatedWalletValue = `${currencySymbol} ${(estimatedWalletValue * currencyRate).toFixed(
|
||||||
|
5,
|
||||||
|
)}`;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Fragment>
|
<Fragment>
|
||||||
<Header
|
<Header
|
||||||
@ -192,12 +208,15 @@ class ProfileScreen extends PureComponent {
|
|||||||
/>
|
/>
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
tabLabel={isReverseHeader
|
tabLabel={
|
||||||
? intl.formatMessage({
|
isReverseHeader
|
||||||
id: 'profile.comments',
|
? intl.formatMessage({
|
||||||
}) : intl.formatMessage({
|
id: 'profile.comments',
|
||||||
id: 'profile.replies',
|
})
|
||||||
})}
|
: intl.formatMessage({
|
||||||
|
id: 'profile.replies',
|
||||||
|
})
|
||||||
|
}
|
||||||
style={styles.commentsTabBar}
|
style={styles.commentsTabBar}
|
||||||
>
|
>
|
||||||
{comments && comments.length > 0 ? (
|
{comments && comments.length > 0 ? (
|
||||||
@ -217,20 +236,22 @@ class ProfileScreen extends PureComponent {
|
|||||||
)}
|
)}
|
||||||
</View>
|
</View>
|
||||||
<View
|
<View
|
||||||
tabLabel={estimatedWalletValue
|
tabLabel={
|
||||||
? `$${Math.round(estimatedWalletValue * 1000) / 1000}`
|
estimatedWalletValue
|
||||||
: intl.formatMessage({
|
? `${_estimatedWalletValue}`
|
||||||
id: 'profile.wallet',
|
: intl.formatMessage({
|
||||||
})}
|
id: 'profile.wallet',
|
||||||
|
})
|
||||||
|
}
|
||||||
>
|
>
|
||||||
{selectedUser
|
{selectedUser ? (
|
||||||
? (
|
<Wallet
|
||||||
<Wallet
|
setEstimatedWalletValue={this._setEstimatedWalletValue}
|
||||||
setEstimatedWalletValue={this._setEstimatedWalletValue}
|
selectedUser={selectedUser}
|
||||||
selectedUser={selectedUser}
|
/>
|
||||||
/>
|
) : (
|
||||||
)
|
<WalletDetailsPlaceHolder />
|
||||||
: <WalletDetailsPlaceHolder />}
|
)}
|
||||||
</View>
|
</View>
|
||||||
</ScrollableTabView>
|
</ScrollableTabView>
|
||||||
</View>
|
</View>
|
||||||
|
@ -22,7 +22,7 @@ import {
|
|||||||
isDarkTheme,
|
isDarkTheme,
|
||||||
openPinCodeModal,
|
openPinCodeModal,
|
||||||
} from '../../../redux/actions/applicationActions';
|
} from '../../../redux/actions/applicationActions';
|
||||||
import { setPushToken, getNodes } from '../../../providers/esteem/esteem';
|
import { setPushToken, getNodes, getCurrencyRate } from '../../../providers/esteem/esteem';
|
||||||
|
|
||||||
// Middleware
|
// Middleware
|
||||||
|
|
||||||
@ -65,8 +65,7 @@ class SettingsContainer extends Component {
|
|||||||
|
|
||||||
switch (actionType) {
|
switch (actionType) {
|
||||||
case 'currency':
|
case 'currency':
|
||||||
dispatch(setCurrency(CURRENCY_VALUE[action]));
|
this._currencyChange(action);
|
||||||
setCurrency2DB(CURRENCY_VALUE[action]);
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 'language':
|
case 'language':
|
||||||
@ -84,6 +83,13 @@ class SettingsContainer extends Component {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
_currencyChange = (action) => {
|
||||||
|
const { dispatch } = this.props;
|
||||||
|
|
||||||
|
dispatch(setCurrency(CURRENCY_VALUE[action]));
|
||||||
|
setCurrency2DB(CURRENCY_VALUE[action]);
|
||||||
|
};
|
||||||
|
|
||||||
_handleToggleChanged = (action, actionType) => {
|
_handleToggleChanged = (action, actionType) => {
|
||||||
const { dispatch } = this.props;
|
const { dispatch } = this.props;
|
||||||
|
|
||||||
@ -174,4 +180,5 @@ const mapStateToProps = state => ({
|
|||||||
isLoggedIn: state.application.isLoggedIn,
|
isLoggedIn: state.application.isLoggedIn,
|
||||||
username: state.account.currentAccount && state.account.currentAccount.name,
|
username: state.account.currentAccount && state.account.currentAccount.name,
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(mapStateToProps)(SettingsContainer);
|
export default connect(mapStateToProps)(SettingsContainer);
|
||||||
|
@ -59,7 +59,7 @@ class SettingsScreen extends PureComponent {
|
|||||||
type="dropdown"
|
type="dropdown"
|
||||||
actionType="currency"
|
actionType="currency"
|
||||||
options={CURRENCY}
|
options={CURRENCY}
|
||||||
selectedOptionIndex={CURRENCY_VALUE.indexOf(selectedCurrency)}
|
selectedOptionIndex={CURRENCY_VALUE.indexOf(selectedCurrency.currency)}
|
||||||
handleOnChange={handleOnChange}
|
handleOnChange={handleOnChange}
|
||||||
/>
|
/>
|
||||||
<SettingsItem
|
<SettingsItem
|
||||||
|
23
yarn.lock
23
yarn.lock
@ -2567,6 +2567,11 @@ csstype@^2.2.0:
|
|||||||
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.8.tgz#4ce5aa16ea0d562ef9105fa3ae2676f199586a35"
|
resolved "https://registry.yarnpkg.com/csstype/-/csstype-2.5.8.tgz#4ce5aa16ea0d562ef9105fa3ae2676f199586a35"
|
||||||
integrity sha512-r4DbsyNJ7slwBSKoGesxDubRWJ71ghG8W2+1HcsDlAo12KGca9dDLv0u98tfdFw7ldBdoA7XmCnI6Q8LpAJXaQ==
|
integrity sha512-r4DbsyNJ7slwBSKoGesxDubRWJ71ghG8W2+1HcsDlAo12KGca9dDLv0u98tfdFw7ldBdoA7XmCnI6Q8LpAJXaQ==
|
||||||
|
|
||||||
|
currency-symbol-map@^4.0.4:
|
||||||
|
version "4.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/currency-symbol-map/-/currency-symbol-map-4.0.4.tgz#3cfba625974dd3f86822d327ecbd10248695e95e"
|
||||||
|
integrity sha512-hkSCCopJXVsvIZIiumJc6FoNXR5LQ646c3ufzF0yfv3155PYygysHw24JuzPSg4j86EFpvtgeX+vEhzRtcJ5Ag==
|
||||||
|
|
||||||
damerau-levenshtein@^1.0.4:
|
damerau-levenshtein@^1.0.4:
|
||||||
version "1.0.4"
|
version "1.0.4"
|
||||||
resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514"
|
resolved "https://registry.yarnpkg.com/damerau-levenshtein/-/damerau-levenshtein-1.0.4.tgz#03191c432cb6eea168bb77f3a55ffdccb8978514"
|
||||||
@ -7260,15 +7265,15 @@ react-transform-hmr@^1.0.4:
|
|||||||
global "^4.3.0"
|
global "^4.3.0"
|
||||||
react-proxy "^1.1.7"
|
react-proxy "^1.1.7"
|
||||||
|
|
||||||
react@^16.6.0-alpha.8af6728:
|
react@^16.7.0:
|
||||||
version "16.6.3"
|
version "16.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/react/-/react-16.6.3.tgz#25d77c91911d6bbdd23db41e70fb094cc1e0871c"
|
resolved "https://registry.yarnpkg.com/react/-/react-16.7.0.tgz#b674ec396b0a5715873b350446f7ea0802ab6381"
|
||||||
integrity sha512-zCvmH2vbEolgKxtqXL2wmGCUxUyNheYn/C+PD1YAjfxHC54+MhdruyhO7QieQrYsYeTxrn93PM2y0jRH1zEExw==
|
integrity sha512-StCz3QY8lxTb5cl2HJxjwLFOXPIFQp+p+hxQfc8WE0QiLfCtIlKj8/+5tjjKm8uSTlAW+fCPaavGFS06V9Ar3A==
|
||||||
dependencies:
|
dependencies:
|
||||||
loose-envify "^1.1.0"
|
loose-envify "^1.1.0"
|
||||||
object-assign "^4.1.1"
|
object-assign "^4.1.1"
|
||||||
prop-types "^15.6.2"
|
prop-types "^15.6.2"
|
||||||
scheduler "^0.11.2"
|
scheduler "^0.12.0"
|
||||||
|
|
||||||
read-pkg-up@^1.0.1:
|
read-pkg-up@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
@ -7756,10 +7761,10 @@ scheduler@^0.10.0-alpha.8af6728:
|
|||||||
loose-envify "^1.1.0"
|
loose-envify "^1.1.0"
|
||||||
object-assign "^4.1.1"
|
object-assign "^4.1.1"
|
||||||
|
|
||||||
scheduler@^0.11.2:
|
scheduler@^0.12.0:
|
||||||
version "0.11.3"
|
version "0.12.0"
|
||||||
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.11.3.tgz#b5769b90cf8b1464f3f3cfcafe8e3cd7555a2d6b"
|
resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.12.0.tgz#8ab17699939c0aedc5a196a657743c496538647b"
|
||||||
integrity sha512-i9X9VRRVZDd3xZw10NY5Z2cVMbdYg6gqFecfj79USv1CFN+YrJ3gIPRKf1qlY+Sxly4djoKdfx1T+m9dnRB8kQ==
|
integrity sha512-t7MBR28Akcp4Jm+QoR63XgAi9YgCUmgvDHqf5otgAj4QvdoBE4ImCX0ffehefePPG+aitiYHp0g/mW6s4Tp+dw==
|
||||||
dependencies:
|
dependencies:
|
||||||
loose-envify "^1.1.0"
|
loose-envify "^1.1.0"
|
||||||
object-assign "^4.1.1"
|
object-assign "^4.1.1"
|
||||||
|
Loading…
Reference in New Issue
Block a user