-
Notifications
You must be signed in to change notification settings - Fork 15
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
TagsSelector undo feature #82
Conversation
c3f8f8c
to
fd4a584
Compare
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.
It works. Small detail to fix and we can merge it.
...in/java/space/taran/arknavigator/mvp/presenter/adapter/tagsselector/TagsSelectorPresenter.kt
Outdated
Show resolved
Hide resolved
|
||
private fun verifyActions() { | ||
if (storage == null || index == null) | ||
return |
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 it probable case that storage
or index
are null
s? If it is possible only in case of a bug, then throw AssertionError("detailed message")
should be used.
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.
storage
and index
are null
's while indexing is in progress and the user can tap "back"
But we handle this case by checking actions.isEmpty()
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.
If we handle this case in other place (onBackClick()
IIUC), then this return
is confusing since we never reach it in fact. I would replace it with AssertionError
then to catch a bug if we are wrong. Technically, we need to put it only for debug mode, but at this stage of project we don't really have production :)
Let's add #83 into this PR ( |
fd4a584
to
d9f17b9
Compare
91a2f55
to
0ea0296
Compare
0ea0296
to
5635c0a
Compare
#18