-
Notifications
You must be signed in to change notification settings - Fork 206
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
Question regarding onDestroyView() #199
Comments
AFAIK Findbugs complained about this one line and I just added that null check. |
Any comments about the second part of my question? |
Second part: yes you can do it in base classes, but personally I just don't Also, for example at the moment I use MVVM at work and our app has old On 31 Aug 2016 10:57 am, "david-perez" [email protected] wrote:
|
Yeah, me too! Planned to do after vacation On 1 Sep 2016 1:21 am, "david-perez" [email protected] wrote:
|
Excerpt from here.
AS code inspection warns that
if (unbinder != null)
condition is alwaystrue
. As the unbinder is tied to the activity/fragment lifecycle, and we don't modify theunbinder
anywhere, I don't see how it may becomenull
.Also, we need to unbind the view from the presenter every time
onDestroyView()/onDestroy()
is called on activities/fragments. Couldn't we hold a reference to a genericPresenter
inBaseActivity/BaseFragment
to callsuper()
and avoid having to write this method every single time?The text was updated successfully, but these errors were encountered: