diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-10-14 22:10:06 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-10-14 22:10:06 -0700 |
commit | d3d1b3f3f09064d9b5811a78458bc421d1287a88 (patch) | |
tree | 5b250fd0fbb9b409811bae4fe64e23efabf1ebd9 /src/github | |
parent | b6da1f99f134ffe1a60910ae0ef3addf75dfb9ab (diff) | |
download | dsub-d3d1b3f3f09064d9b5811a78458bc421d1287a88.tar.gz dsub-d3d1b3f3f09064d9b5811a78458bc421d1287a88.tar.bz2 dsub-d3d1b3f3f09064d9b5811a78458bc421d1287a88.zip |
Confirm for clearing current queue
Diffstat (limited to 'src/github')
-rw-r--r-- | src/github/daneren2005/dsub/fragments/DownloadFragment.java | 35 |
1 files changed, 20 insertions, 15 deletions
diff --git a/src/github/daneren2005/dsub/fragments/DownloadFragment.java b/src/github/daneren2005/dsub/fragments/DownloadFragment.java index bf47e95e..7bd162f1 100644 --- a/src/github/daneren2005/dsub/fragments/DownloadFragment.java +++ b/src/github/daneren2005/dsub/fragments/DownloadFragment.java @@ -612,24 +612,29 @@ public class DownloadFragment extends SubsonicFragment implements OnGestureListe getDownloadService().delete(songs);
return true;
case R.id.menu_remove_all:
- new SilentBackgroundTask<Void>(context) {
+ Util.confirmDialog(context, R.string.download_menu_remove_all, "", new DialogInterface.OnClickListener() {
@Override
- protected Void doInBackground() throws Throwable {
- getDownloadService().setShufflePlayEnabled(false);
- if(nowPlaying) {
- getDownloadService().clear();
- }
- else {
- getDownloadService().clearBackground();
- }
- return null;
- }
+ public void onClick(DialogInterface dialog, int which) {
+ new SilentBackgroundTask<Void>(context) {
+ @Override
+ protected Void doInBackground() throws Throwable {
+ getDownloadService().setShufflePlayEnabled(false);
+ if(nowPlaying) {
+ getDownloadService().clear();
+ }
+ else {
+ getDownloadService().clearBackground();
+ }
+ return null;
+ }
- @Override
- protected void done(Void result) {
- onDownloadListChanged();
+ @Override
+ protected void done(Void result) {
+ onDownloadListChanged();
+ }
+ }.execute();
}
- }.execute();
+ });
return true;
case R.id.menu_screen_on_off:
if (getDownloadService().getKeepScreenOn()) {
|