kopia lustrzana https://github.com/TeamNewPipe/NewPipe
Merge pull request #5896 from Stypox/fix-error-panel
Fix error panel created in onViewCreated() but disposed in onDestroy()pull/5906/head
commit
fe43b4da39
|
@ -56,12 +56,6 @@ public abstract class BaseStateFragment<I> extends BaseFragment implements ViewC
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroy() {
|
||||
super.onDestroy();
|
||||
errorPanelHelper.dispose();
|
||||
}
|
||||
|
||||
/*//////////////////////////////////////////////////////////////////////////
|
||||
// Init
|
||||
//////////////////////////////////////////////////////////////////////////*/
|
||||
|
@ -74,6 +68,14 @@ public abstract class BaseStateFragment<I> extends BaseFragment implements ViewC
|
|||
errorPanelHelper = new ErrorPanelHelper(this, rootView, this::onRetryButtonClicked);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onDestroyView() {
|
||||
super.onDestroyView();
|
||||
if (errorPanelHelper != null) {
|
||||
errorPanelHelper.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
protected void onRetryButtonClicked() {
|
||||
reloadContent();
|
||||
}
|
||||
|
|
Ładowanie…
Reference in New Issue