Always check whether context has been destroyed.

This commit is contained in:
akwizgran
2016-09-29 14:52:00 +01:00
parent f1730aa7d9
commit cb983f02c2
49 changed files with 310 additions and 340 deletions

View File

@@ -90,6 +90,7 @@ abstract class BasePostPagerFragment extends BaseFragment
abstract void loadBlogPost(BlogPostHeader header);
@UiThread
protected void onBlogPostsLoaded(MessageId select,
Collection<BlogPostItem> posts) {
@@ -98,6 +99,7 @@ abstract class BasePostPagerFragment extends BaseFragment
selectPost(select);
}
@UiThread
protected void onBlogPostsLoadedException(DbException exception) {
// TODO: Decide how to handle errors in the UI
finish();
@@ -174,4 +176,8 @@ abstract class BasePostPagerFragment extends BaseFragment
}
}
@Override
public void onBlogRemoved() {
finish();
}
}