Search in sources :

Example 1 with NewTopicTask

use of org.mazhuang.guanggoo.data.task.NewTopicTask in project guanggoo-android by mzlogin.

the class NewTopicPresenter method newTopic.

@Override
public void newTopic(String title, String content) {
    mView.startLoading();
    title = EmojiParser.parseToAliases(title);
    content = EmojiParser.parseToAliases(content);
    NetworkTaskScheduler.getInstance().execute(new NewTopicTask(mView.getUrl(), title, content, new OnResponseListener<String>() {

        @Override
        public void onSucceed(String data) {
            mView.stopLoading();
            mView.onNewTopicSucceed();
        }

        @Override
        public void onFailed(String msg) {
            mView.stopLoading();
            mView.onNewTopicFailed(msg);
        }
    }));
}
Also used : NewTopicTask(org.mazhuang.guanggoo.data.task.NewTopicTask) OnResponseListener(org.mazhuang.guanggoo.data.OnResponseListener)

Aggregations

OnResponseListener (org.mazhuang.guanggoo.data.OnResponseListener)1 NewTopicTask (org.mazhuang.guanggoo.data.task.NewTopicTask)1