moxy-community / Moxy

Moxy is MVP library for Android with incremental annotation processor and ktx features
MIT License
327 stars 33 forks source link

Fix restoration of childDelegate delegateTag #80

Closed IlyaGulya closed 4 years ago

IlyaGulya commented 4 years ago

Problem: the only way for childDelegate to save its delegateTag is to call onSaveInstanceState() However, this method is not called in Fragment when fragment goes to backStack.

So, I'm calling MvpDelegate.onSaveInstanceState() manually on each childDelegate in MvpDelegate.onDestroyView() method since after calling this method childDelegate become destroyed and losing its connection to parentDelegate