Adressed some of the observations made re the last commits.
This commit is contained in:
parent
371a7bb4af
commit
3068d687bf
|
@ -190,6 +190,7 @@ public class GBAlarm implements Parcelable, Comparable {
|
|||
String alarmString = iterator.next();
|
||||
if(this.equals(new GBAlarm(alarmString))) {
|
||||
iterator.remove();
|
||||
break;
|
||||
}
|
||||
}
|
||||
newPrefs.add(this.toPreferences());
|
||||
|
|
|
@ -40,14 +40,9 @@ public class GBAlarmListAdapter extends ArrayAdapter<GBAlarm> {
|
|||
this.mContext = context;
|
||||
alarmList = new ArrayList<GBAlarm>();
|
||||
|
||||
if (preferencesAlarmListSet != null) {
|
||||
Iterator<String> iterator = preferencesAlarmListSet.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
String alarmString = iterator.next();
|
||||
for (String alarmString : preferencesAlarmListSet) {
|
||||
alarmList.add(new GBAlarm(alarmString));
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(alarmList);
|
||||
}
|
||||
|
@ -55,14 +50,9 @@ public class GBAlarmListAdapter extends ArrayAdapter<GBAlarm> {
|
|||
public void setAlarmList(Set<String> preferencesAlarmListSet) {
|
||||
alarmList = new ArrayList<GBAlarm>();
|
||||
|
||||
if (preferencesAlarmListSet != null) {
|
||||
Iterator<String> iterator = preferencesAlarmListSet.iterator();
|
||||
|
||||
while (iterator.hasNext()) {
|
||||
String alarmString = iterator.next();
|
||||
for (String alarmString : preferencesAlarmListSet) {
|
||||
alarmList.add(new GBAlarm(alarmString));
|
||||
}
|
||||
}
|
||||
|
||||
Collections.sort(alarmList);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue