Commit d220f6e7 authored by Felix Paul Kühne's avatar Felix Paul Kühne

Fix logic bug

parent 21b12688
......@@ -97,19 +97,19 @@
for (NSUInteger x = 0; x < imageCount; x++) {
NSDictionary *imageDict = imagesArray[x];
NSInteger imageWidth = [imageDict[@"width"] integerValue];
NSInteger heightWidth = [imageDict[@"height"] integerValue];
NSInteger imageHeight = [imageDict[@"height"] integerValue];
NSString *imageURL = imageDict[@"url"];
if (imageWidth > 1000) {
[largeImages addObject:imageURL];
if (imageWidth > imageWidth) {
if (imageWidth > imageHeight) {
[largeLandscapeImages addObject:imageURL];
} else {
[largePortraitImages addObject:imageURL];
}
} else {
[mediumImages addObject:imageDict[@"url"]];
if (imageWidth > imageWidth) {
if (imageWidth > imageHeight) {
[mediumLandscapeImages addObject:imageURL];
} else {
[mediumPortraitImages addObject:imageURL];
......@@ -214,19 +214,19 @@
for (NSUInteger x = 0; x < imageCount; x++) {
NSDictionary *imageDict = imagesArray[x];
NSInteger imageWidth = [imageDict[@"width"] integerValue];
NSInteger heightWidth = [imageDict[@"height"] integerValue];
NSInteger imageHeight = [imageDict[@"height"] integerValue];
NSString *imageURL = imageDict[@"url"];
if (imageWidth > 1000) {
[largeImages addObject:imageURL];
if (imageWidth > imageWidth) {
if (imageWidth > imageHeight) {
[largeLandscapeImages addObject:imageURL];
} else {
[largePortraitImages addObject:imageURL];
}
} else {
[mediumImages addObject:imageDict[@"url"]];
if (imageWidth > imageWidth) {
if (imageWidth > imageHeight) {
[mediumLandscapeImages addObject:imageURL];
} else {
[mediumPortraitImages addObject:imageURL];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment