Remove 'all' as a Platform enum.
This will remove the 'all games' row on the TV view.
This commit is contained in:
parent
cc77a4963f
commit
3c3d0fa6f5
|
@ -70,9 +70,10 @@ public final class GameRowPresenter extends Presenter
|
|||
backgroundId = R.drawable.tv_card_background_wii;
|
||||
break;
|
||||
case WIIWARE:
|
||||
default: // This shouldn't happen, but set the default to WiiWare colors.
|
||||
backgroundId = R.drawable.tv_card_background_wiiware;
|
||||
break;
|
||||
default:
|
||||
throw new AssertionError("Not reachable.");
|
||||
}
|
||||
Context context = holder.cardParent.getContext();
|
||||
Drawable background = ContextCompat.getDrawable(context, backgroundId);
|
||||
|
|
|
@ -262,21 +262,13 @@ public final class GameDatabase extends SQLiteOpenHelper
|
|||
{
|
||||
Log.info("[GameDatabase] Reading games list...");
|
||||
|
||||
|
||||
// Only add a WHERE clause if we have a specific platform
|
||||
String whereClause = null;
|
||||
String[] whereArgs = null;
|
||||
if (platform != Platform.ALL)
|
||||
{
|
||||
whereClause = KEY_GAME_PLATFORM + " = ?";
|
||||
whereArgs = new String[]{Integer.toString(platform.toInt())};
|
||||
}
|
||||
String[] whereArgs = new String[]{Integer.toString(platform.toInt())};
|
||||
|
||||
SQLiteDatabase database = getReadableDatabase();
|
||||
Cursor resultCursor = database.query(
|
||||
TABLE_NAME_GAMES,
|
||||
null,
|
||||
whereClause,
|
||||
KEY_GAME_PLATFORM + " = ?",
|
||||
whereArgs,
|
||||
null,
|
||||
null,
|
||||
|
|
|
@ -5,8 +5,7 @@ public enum Platform
|
|||
{
|
||||
GAMECUBE(0, "GameCube Games"),
|
||||
WII(1, "Wii Games"),
|
||||
WIIWARE(2, "WiiWare Games"),
|
||||
ALL(3, "All Games");
|
||||
WIIWARE(2, "WiiWare Games");
|
||||
|
||||
private final int value;
|
||||
private final String headerName;
|
||||
|
|
Loading…
Reference in New Issue