Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Fixed code style #191

Merged
merged 1 commit into from
Dec 9, 2016
Merged

Fixed code style #191

merged 1 commit into from
Dec 9, 2016

Conversation

revolter
Copy link
Member

@revolter revolter commented Dec 9, 2016

Extracted duplicate "hack" into a clearly named function. Previously, not all
instances had the explanation comment, and its side effect was not clear.

Extracted duplicate "hack" into a clearly named function. Previously, not all
instances had the explanation comment, and its side effect was not clear.
Copy link
Member

@hebertialmeida hebertialmeida left a comment

Choose a reason for hiding this comment

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

Much better, thanks...

// Forces text selection clearing
// @NOTE: this doesn't seem to always work

self.isUserInteractionEnabled = false
Copy link
Member

Choose a reason for hiding this comment

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

Don't need to use self here.

isUserInteractionEnabled = false
isUserInteractionEnabled = true

self.clearTextSelection()
Copy link
Member

Choose a reason for hiding this comment

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

Don't need to use self here.

Copy link
Member Author

Choose a reason for hiding this comment

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

I know, but it's more consistent and clear this way.

Copy link
Member Author

Choose a reason for hiding this comment

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

I am personally going by this answer:

I would prefer to keep using self whenever I'm using a property to omit these misunderstandings.

What do you think?

@hebertialmeida hebertialmeida merged commit 3377280 into FolioReader:master Dec 9, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants