use runOnUiThread in RefreshTask

This commit is contained in:
Andrew Dolgov 2012-01-10 15:13:46 +04:00
parent adf1750387
commit 055707ce67

View File

@ -333,10 +333,16 @@ public class MainActivity extends FragmentActivity implements OnlineServices {
if (networkInfo != null && networkInfo.isAvailable() if (networkInfo != null && networkInfo.isAvailable()
&& networkInfo.isConnected()) { && networkInfo.isConnected()) {
if (!m_enableCats || m_activeCategory != null) runOnUiThread(new Runnable() {
refreshFeeds(); @Override
else public void run() {
refreshCategories(); if (!m_enableCats || m_activeCategory != null)
refreshFeeds();
else
refreshCategories();
}
});
} }
} }
} }