Wordpress-android: Make WordPress.currentBlog private and use WordPress.getCurrentBlog() instead

Created on 4 Feb 2014  路  3Comments  路  Source: wordpress-mobile/WordPress-Android

WordPress.getCurrentBlog() tries to recover a blog object if there wasn't one previously set, so it's safer to use than WordPress.currentBlog throughout the app.

Core [Type] Enhancement

Most helpful comment

RIP currentBlog and getCurrentBlog().

All 3 comments

I would rename getCurrentBlog - it can feel weird the state of currentBlog change after this is called.

The upcoming FluxC integration removes WordPress.currentBlog and WordPress.getCurrentBlog() entirely, and we instead pass the current SiteModel through the app.

RIP currentBlog and getCurrentBlog().

Was this page helpful?
0 / 5 - 0 ratings