sitessetuppresenter: check for add dialog callback nullity

somehow the dialog is first detached from the window, and then
the button click is propagated.
not sure how this can happen, because we have overridden the button
press dismiss behavior.
refactor-toolbar
Floens 8 years ago
parent d5db02f30f
commit ebdf2406a2
  1. 8
      Clover/app/src/main/java/org/floens/chan/core/presenter/SitesSetupPresenter.java

@ -88,12 +88,16 @@ public class SitesSetupPresenter {
@Override
public void onSiteAdded(Site site) {
siteAdded(site);
addCallback.dismissDialog();
if (addCallback != null) {
addCallback.dismissDialog();
}
}
@Override
public void onSiteAddFailed(String message) {
addCallback.showAddError(message);
if (addCallback != null) {
addCallback.showAddError(message);
}
}
});
}

Loading…
Cancel
Save