Commit 0eccd118 authored by Mike Sheldon's avatar Mike Sheldon

Only add the default stations in Libre Droid if the stations list is empty...

Only add the default stations in Libre Droid if the stations list is empty (allows for users to delete unwanted default stations in the future)
parent e28d6137
......@@ -135,9 +135,11 @@ public class LibreDroid extends ListActivity {
Log.d("libredroid", ex.getMessage());
}
// Add default stations if empty
String radioButtons[] = { "Folk", "Rock", "Metal", "Classical", "Pop",
"Punk", "Jazz", "Blues", "Rap", "Ambient", "Add A Custom Station..." };
stations.addAll(Arrays.asList(radioButtons));
if(stations.isEmpty()) {
String radioButtons[] = { "Folk", "Rock", "Metal", "Classical", "Pop",
"Punk", "Jazz", "Blues", "Rap", "Ambient", "Add A Custom Station..." };
stations.addAll(Arrays.asList(radioButtons));
}
setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, stations));
Button tagStation = (Button) findViewById(R.id.tagStationButton);
......
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