diff options
author | Scott Jackson <daneren2005@gmail.com> | 2013-04-30 21:38:28 -0700 |
---|---|---|
committer | Scott Jackson <daneren2005@gmail.com> | 2013-04-30 21:38:28 -0700 |
commit | b59d47572ce3b7936328cc9c985355eefe24faa5 (patch) | |
tree | 959808e3791d2199c8149bbace8768a84037e295 /subsonic-android | |
parent | 9b50d192a35c4d5ff14d18cdc0bc1dda4e93997d (diff) | |
download | dsub-b59d47572ce3b7936328cc9c985355eefe24faa5.tar.gz dsub-b59d47572ce3b7936328cc9c985355eefe24faa5.tar.bz2 dsub-b59d47572ce3b7936328cc9c985355eefe24faa5.zip |
After leaving search activity, remove it from activity stack
Diffstat (limited to 'subsonic-android')
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java | 4 | ||||
-rw-r--r-- | subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java | 7 |
2 files changed, 11 insertions, 0 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java index 04d4fc65..63c41546 100644 --- a/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java +++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SelectDirectoryFragment.java @@ -25,6 +25,7 @@ import github.daneren2005.dsub.view.EntryAdapter; import java.util.List;
import com.mobeta.android.dslv.*;
import github.daneren2005.dsub.activity.DownloadActivity;
+import github.daneren2005.dsub.activity.SearchActivity;
import github.daneren2005.dsub.service.DownloadFile;
import github.daneren2005.dsub.service.MusicService;
import github.daneren2005.dsub.service.MusicServiceFactory;
@@ -478,6 +479,9 @@ public class SelectDirectoryFragment extends SubsonicFragment implements Adapter }
if (autoplay) {
Util.startActivityWithoutTransition(context, DownloadActivity.class);
+ if(context instanceof SearchActivity) {
+ context.finish();
+ }
} else if (save) {
Util.toast(context,
context.getResources().getQuantityString(R.plurals.select_album_n_songs_downloading, songs.size(), songs.size()));
diff --git a/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java b/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java index e1c8087b..09d0e5d5 100644 --- a/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java +++ b/subsonic-android/src/github/daneren2005/dsub/fragments/SubsonicFragment.java @@ -42,6 +42,7 @@ import github.daneren2005.dsub.R; import github.daneren2005.dsub.activity.DownloadActivity;
import github.daneren2005.dsub.activity.HelpActivity;
import github.daneren2005.dsub.activity.MainActivity;
+import github.daneren2005.dsub.activity.SearchActivity;
import github.daneren2005.dsub.activity.SettingsActivity;
import github.daneren2005.dsub.activity.SubsonicActivity;
import github.daneren2005.dsub.domain.Artist;
@@ -195,6 +196,9 @@ public class SubsonicFragment extends SherlockFragment { getDownloadService().clear();
getDownloadService().download(songs, false, true, true, false);
Util.startActivityWithoutTransition(context, DownloadActivity.class);
+ if(context instanceof SearchActivity) {
+ context.finish();
+ }
break;
case R.id.song_menu_play_next:
getDownloadService().download(songs, false, false, true, false);
@@ -488,6 +492,9 @@ public class SubsonicFragment extends SherlockFragment { downloadService.download(songs, save, autoplay, false, shuffle);
if(!append) {
Util.startActivityWithoutTransition(context, DownloadActivity.class);
+ if(context instanceof SearchActivity) {
+ context.finish();
+ }
}
}
else {
|