Refactor QueueEvent
This commit is contained in:
parent
5328bd2b06
commit
c81a9b102f
|
@ -688,15 +688,13 @@ public class MainActivity extends AppCompatActivity implements NavDrawerActivity
|
||||||
|
|
||||||
public void onEvent(QueueEvent event) {
|
public void onEvent(QueueEvent event) {
|
||||||
Log.d(TAG, "onEvent(" + event + ")");
|
Log.d(TAG, "onEvent(" + event + ")");
|
||||||
switch(event.action) {
|
// we are only interested in the number of queue items, not download status or position
|
||||||
case ADDED:
|
if(event.action == QueueEvent.Action.DELETED_MEDIA ||
|
||||||
case ADDED_ITEMS:
|
event.action == QueueEvent.Action.SORTED ||
|
||||||
case SET_QUEUE:
|
event.action == QueueEvent.Action.MOVED) {
|
||||||
case REMOVED:
|
return;
|
||||||
case IRREVERSIBLE_REMOVED:
|
|
||||||
case CLEARED:
|
|
||||||
loadData();
|
|
||||||
}
|
}
|
||||||
|
loadData();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onEventMainThread(ProgressEvent event) {
|
public void onEventMainThread(ProgressEvent event) {
|
||||||
|
|
Loading…
Reference in New Issue