git.gnu.io has moved to IP address 209.51.188.249 -- please double check where you are logging in.

fix custom tag station of libredroid

parent 7c52b0cf
......@@ -13,6 +13,7 @@
<string name="tag_stations">Tag Stations</string>
<string name="loved_tracks">Your Loved Tracks</string>
<string name="community_loved">Community\'s Loved Tracks</string>
<string name="add_custom_tag_station">Add a custom station...</string>
<string name="add_station">Add Station</string>
<string name="sd_card_needed">Please ensure an SD card is inserted before attempting to download songs.</string>
<string name="finished_download">Finished downloading &quot;%s&quot;</string>
......
......@@ -136,8 +136,9 @@ public class LibreDroid extends ListActivity {
}
// Add default stations if empty
if(stations.isEmpty()) {
String addCustomTagStation = getString(R.string.add_custom_tag_station);
String radioButtons[] = { "Folk", "Rock", "Metal", "Classical", "Pop",
"Punk", "Jazz", "Blues", "Rap", "Ambient", "Add A Custom Station..." };
"Punk", "Jazz", "Blues", "Rap", "Ambient", addCustomTagStation };
stations.addAll(Arrays.asList(radioButtons));
}
setListAdapter(new ArrayAdapter<String>(this, R.layout.list_item, stations));
......@@ -222,7 +223,8 @@ public class LibreDroid extends ListActivity {
public void onListItemClick(ListView l, View v, int pos, long id) {
super.onListItemClick(l, v, pos, id);
String selection = l.getItemAtPosition(pos).toString();
if(selection.equals(R.string.add_station)) {
String addCustomTagStation = getString(R.string.add_custom_tag_station);
if(selection.equals(addCustomTagStation)) {
LibreDroid.this.nextPage();
} else {
LibreDroid.this.libreServiceConn.service.tuneStation("globaltags", selection);
......@@ -558,4 +560,4 @@ public class LibreDroid extends ListActivity {
}
}
\ No newline at end of file
}
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