Search in sources :

Example 1 with BroadcastDeletedEvent

use of me.zhanghai.android.douya.eventbus.BroadcastDeletedEvent in project Douya by DreaminginCodeZH.

the class DeleteBroadcastWriter method onResponse.

@Override
public void onResponse(Broadcast response) {
    ToastUtils.show(R.string.broadcast_delete_successful, getContext());
    EventBusUtils.postAsync(new BroadcastDeletedEvent(response.id, this));
    stopSelf();
}
Also used : BroadcastDeletedEvent(me.zhanghai.android.douya.eventbus.BroadcastDeletedEvent)

Example 2 with BroadcastDeletedEvent

use of me.zhanghai.android.douya.eventbus.BroadcastDeletedEvent in project Douya by DreaminginCodeZH.

the class RebroadcastBroadcastWriter method onResponse.

@Override
public void onResponse(Broadcast response) {
    ToastUtils.show(mRebroadcast ? R.string.broadcast_rebroadcast_successful : R.string.broadcast_unrebroadcast_successful, getContext());
    if (!mRebroadcast) {
        // old one.
        if (mBroadcast != null && mBroadcast.rebroadcastId != null) {
            EventBusUtils.postAsync(new BroadcastDeletedEvent(mBroadcast.rebroadcastId, this));
        }
    }
    EventBusUtils.postAsync(new BroadcastUpdatedEvent(response, this));
    stopSelf();
}
Also used : BroadcastDeletedEvent(me.zhanghai.android.douya.eventbus.BroadcastDeletedEvent) BroadcastUpdatedEvent(me.zhanghai.android.douya.eventbus.BroadcastUpdatedEvent)

Aggregations

BroadcastDeletedEvent (me.zhanghai.android.douya.eventbus.BroadcastDeletedEvent)2 BroadcastUpdatedEvent (me.zhanghai.android.douya.eventbus.BroadcastUpdatedEvent)1