-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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() { |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
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.