Skip to content
This repository has been archived by the owner on Sep 4, 2018. It is now read-only.

Some fixes #246

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Some fixes #246

wants to merge 12 commits into from

Conversation

dev4dev
Copy link
Contributor

@dev4dev dev4dev commented Mar 30, 2015

I made some changes to screenshots preview, and they should fix these issues: #227 #230 #239

[self cacheImage:image forPackage:package];
if (completion)
completion(package, image);
}];
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use braces around these if statements

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always use them, but that piece of code was just copy-pasted from project, I thought that it's coding style which you use.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I think we agreed to always use them some time ago

@jurre
Copy link
Collaborator

jurre commented Mar 30, 2015

Thanks @dev4dev! I'd like @kattrali or @supermarin to look this over.

I saw a few things that I'm unsure about and commented inline, one other thing is we're now mixing tabs and spaces (it used to be all spaces). I don't really mind either way but it'd be nice if all code was indented the same.

dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
// wait next run loop, otherwise there are no rows yet
[self loadImagesInVisibleRows];
});
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this an indication that something somewhere else is going wrong?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cells will be visible only in the next runloop, so this is a solution I know. If you can recommend something better - I'd appreciate that :)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why load the table and then fetch images instead of loading the images when the cell is loaded? There's a bit more delay before all the images have been cached.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because I don't load images when cell loaded, only after slight delay when scroll ends. So if I scroll quickly through list, I wont get all them in loading queue.
Actually this part of code loads images in first visible cells after changing filtering predicate, because scroll event wont be fired at this point.

@kattrali
Copy link
Contributor

Fixes all the bugs, thanks!

✅ Filtering doesn't mix screenshots
✅ No crash
✅ No image flipping

Though we have a slight issue now with scaling. Before the intended scale was to fit the image view horizontally, now all the images are tiny instead:

window on 10.9

} else {
[view.previewButton setImage:nil];
}
view.screenshotPath = package.screenshotPath;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely should keep indentation consistent with the project; soft tabs, 4 spaces per tab.

@dev4dev
Copy link
Contributor Author

dev4dev commented Mar 30, 2015

And would you be so kind to fix tabs -> space issue by yourself. I'm tab person and it's against my religion 8)

@kattrali
Copy link
Contributor

There is no reason for anyone to change religions, but making your code conform to the existing codebase does not seem to be an unreasonable request.

@mokagio
Copy link

mokagio commented Mar 30, 2015

@dev4dev are you serious?

@dev4dev
Copy link
Contributor Author

dev4dev commented Mar 31, 2015

@mokagio actually not 😸, but I do really don't like to use spaces for indentation 😈

@kattrali
Copy link
Contributor

lol

@dev4dev
Copy link
Contributor Author

dev4dev commented Apr 6, 2015

Soooo ❓

@dev4dev
Copy link
Contributor Author

dev4dev commented Apr 13, 2015

removed

@alcatraz alcatraz locked and limited conversation to collaborators Apr 13, 2015
@jurre
Copy link
Collaborator

jurre commented Apr 13, 2015

Thanks for your PR. We'll try to get these fixes in soon :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants