File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
WordPress/src/main/java/org/wordpress/android/ui/main Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -358,7 +358,15 @@ public void onEventMainThread(CoreEvents.MainViewPagerScrolled event) {
358
358
359
359
@ SuppressWarnings ("unused" )
360
360
public void onEventMainThread (CoreEvents .BlogListChanged event ) {
361
- if (!isAdded () || (mBlog = WordPress .getBlog (mBlog .getLocalTableBlogId ())) == null ) return ;
361
+ if (!isAdded () || mBlog == null ) {
362
+ return ;
363
+ }
364
+
365
+ // Update selected blog in case it was changed or deleted / removed.
366
+ mBlog = WordPress .getBlog (mBlog .getLocalTableBlogId ());
367
+ if (mBlog == null ) {
368
+ return ;
369
+ }
362
370
363
371
// Update view if blog has a new name
364
372
if (!mBlogTitleTextView .getText ().equals (mBlog .getBlogName ())) {
You can’t perform that action at this time.
0 commit comments