use of org.wordpress.android.fluxc.store.TaxonomyStore.RemoteTermPayload in project WordPress-Android by wordpress-mobile.
the class SelectCategoriesActivity method onActivityResult.
@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
super.onActivityResult(requestCode, resultCode, data);
if (data != null) {
final Bundle extras = data.getExtras();
switch(requestCode) {
case ACTIVITY_REQUEST_CODE_ADD_CATEGORY:
if (resultCode == RESULT_OK) {
TermModel newCategory = (TermModel) extras.getSerializable(AddCategoryActivity.KEY_CATEGORY);
// Save selected categories
updateSelectedCategoryList();
mListScrollPositionManager.saveScrollOffset();
mSwipeToRefreshHelper.setRefreshing(true);
RemoteTermPayload payload = new RemoteTermPayload(newCategory, mSite);
mDispatcher.dispatch(TaxonomyActionBuilder.newPushTermAction(payload));
break;
}
}
}
}
Aggregations