Commit 51fa5470 authored by Sébastien Toque's avatar Sébastien Toque
Browse files

don't keep START_FROM_NOTIFICATION state in MainActivity

parent e740cffe
......@@ -182,14 +182,17 @@ public class MainActivity extends SherlockFragmentActivity {
SharedPreferences sharedPrefs = getSharedPreferences("MainActivity", MODE_PRIVATE);
mCurrentViewTab = sharedPrefs.getInt("tab", VIDEO_TAB);
mMediaLibraryActive = sharedPrefs.getBoolean("medialibrary", true);
Boolean startFromNotification = getIntent().hasExtra(AudioService.START_FROM_NOTIFICATION);
/* Restore last view */
if(!mMediaLibraryActive)
showDirectoryView();
else if (getIntent().hasExtra(AudioService.START_FROM_NOTIFICATION) || mCurrentViewTab == AUDIO_TAB)
else if (startFromNotification || mCurrentViewTab == AUDIO_TAB)
showAudioTab();
else
showVideoTab();
if (startFromNotification)
getIntent().removeExtra(AudioService.START_FROM_NOTIFICATION);
super.onResume();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment