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 single mode #7

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

Fix single mode #7

wants to merge 2 commits into from

Conversation

elodieferrais
Copy link
Contributor

Now, when the single mode is one, we can only see one cell swiped at a time. When the user swipe a second cell, the first one close.

Copy link
Contributor

@breakingthebuild breakingthebuild left a comment

Choose a reason for hiding this comment

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

Looking really good. Just had 2 minor questions/feedback


private val openPositions: MutableSet<Int> = HashSet()
private var mode = Single
class SwipableCellHandler() {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the empty constructor can be removed

if (isOpen(layout.tag as Int)) layout.open(false, false)
else layout.close(false, false)
if (isOpen(layout.tag as Int)) layout.open(smooth = false, notify = false)
else layout.close(smooth = false, notify = false)
})

}

@JvmOverloads
fun reset(position: Int? = null) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this method being used? If not, can you remove it?

Copy link
Contributor Author

@elodieferrais elodieferrais Apr 30, 2019

Choose a reason for hiding this comment

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

You are right, it's not used. You don't think it could be useful to have a method to programmatically close all the "open" cells? Meaning cell being swiped.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it is fine to leave it.

@breakingthebuild breakingthebuild added revision needed Revision needed and removed review needed Review needed labels Apr 11, 2019
@elodieferrais elodieferrais added need clarification Need clarification and removed revision needed Revision needed labels Apr 30, 2019
@breakingthebuild breakingthebuild added revision needed Revision needed and removed need clarification Need clarification labels May 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working revision needed Revision needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants