mirror of
https://codeberg.org/Freeyourgadget/Gadgetbridge
synced 2025-01-12 18:57:36 +01:00
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,13 +40,8 @@ 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();
|
||||
alarmList.add(new GBAlarm(alarmString));
|
||||
}
|
||||
for (String alarmString : preferencesAlarmListSet) {
|
||||
alarmList.add(new GBAlarm(alarmString));
|
||||
}
|
||||
|
||||
Collections.sort(alarmList);
|
||||
@ -55,13 +50,8 @@ 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();
|
||||
alarmList.add(new GBAlarm(alarmString));
|
||||
}
|
||||
for (String alarmString : preferencesAlarmListSet) {
|
||||
alarmList.add(new GBAlarm(alarmString));
|
||||
}
|
||||
|
||||
Collections.sort(alarmList);
|
||||
|
Loading…
x
Reference in New Issue
Block a user