Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs #67

Merged
merged 6 commits into from
Jan 26, 2018
Merged

Fix bugs #67

merged 6 commits into from
Jan 26, 2018

Conversation

radyslavkrechet
Copy link
Contributor

One commits name = one description of bug fixes

switch section {
case HomeSection.lastArrivals.rawValue:
type = .latestArrivals
isNeedToHideSeeAllButton = delegate?.lastArrivalsObjectsCount() ?? 0 < kItemsPerPage ? true : false
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need ternary operator here, just use delegate?.lastArrivalsObjectsCount() ?? 0 < kItemsPerPage

default:
type = .blogPosts
isNeedToHideSeeAllButton = delegate?.articlesCount() ?? 0 < kItemsPerPage ? true : false
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need ternary operator here, just use delegate?.articlesCount() ?? 0 < kItemsPerPage

updateCustomer(with: query, callback: callback)
updateCustomer(with: query) { [weak self] (customer, error) in
if customer != nil {
self?.updateSessionDate(with: email)
Copy link
Contributor

Choose a reason for hiding this comment

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

By our styleguide (https://github.com/plzen/styleguides/blob/master/ios/STYLEGUIDE.md#memory-management) we need to use:
guard let strongSelf = self else {
return
}
strongSelf.updateSessionDate(with: email)

instead of:

self?.updateSessionDate(with: email)

@radyslavkrechet radyslavkrechet merged commit f5d2c39 into develop Jan 26, 2018
@radyslavkrechet radyslavkrechet deleted the feature/bug_fixes branch January 26, 2018 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants