OSDN Git Service

Eleven: Fix regression in smart playlist navigation
authorlinus_lee <llee@cyngn.com>
Thu, 9 Oct 2014 04:14:09 +0000 (21:14 -0700)
committerlinus_lee <llee@cyngn.com>
Thu, 20 Nov 2014 20:51:32 +0000 (12:51 -0800)
I inadvertantly switched ordinal to id while changing other ordinals.
Ids are fine but I didn't update the HomeActivity logic

Change-Id: I1f97db3ff3f0e6e94da3fe9dd67184d4c375b516

src/com/cyngn/eleven/ui/activities/HomeActivity.java

index 1f650ad..93c50fc 100644 (file)
@@ -110,8 +110,8 @@ public class HomeActivity extends SlidingPanelActivity {
             FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
 
             if (action.equals(ACTION_VIEW_SMART_PLAYLIST)) {
-                int playlistType = intent.getExtras().getInt(Config.SMART_PLAYLIST_TYPE);
-                switch (Config.SmartPlaylistType.values()[playlistType]) {
+                long playlistId = intent.getExtras().getLong(Config.SMART_PLAYLIST_TYPE);
+                switch (Config.SmartPlaylistType.getTypeById(playlistId)) {
                     case LastAdded:
                         targetFragment = new LastAddedFragment();
                         break;