mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 09:08:52 -06:00
ScoreList: Remove ModelObservable
This commit is contained in:
@@ -33,8 +33,6 @@ public abstract class ScoreList implements Iterable<Score>
|
|||||||
{
|
{
|
||||||
protected Habit habit;
|
protected Habit habit;
|
||||||
|
|
||||||
protected ModelObservable observable = new ModelObservable();
|
|
||||||
|
|
||||||
public void setHabit(Habit habit)
|
public void setHabit(Habit habit)
|
||||||
{
|
{
|
||||||
this.habit = habit;
|
this.habit = habit;
|
||||||
@@ -50,11 +48,6 @@ public abstract class ScoreList implements Iterable<Score>
|
|||||||
*/
|
*/
|
||||||
public abstract void add(List<Score> scores);
|
public abstract void add(List<Score> scores);
|
||||||
|
|
||||||
public ModelObservable getObservable()
|
|
||||||
{
|
|
||||||
return observable;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the value of the score for today.
|
* Returns the value of the score for today.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ public class MemoryScoreList extends ScoreList
|
|||||||
list.addAll(scores);
|
list.addAll(scores);
|
||||||
Collections.sort(list,
|
Collections.sort(list,
|
||||||
(s1, s2) -> s2.getTimestamp().compareTo(s1.getTimestamp()));
|
(s1, s2) -> s2.getTimestamp().compareTo(s1.getTimestamp()));
|
||||||
getObservable().notifyListeners();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@NonNull
|
@NonNull
|
||||||
@@ -71,7 +70,6 @@ public class MemoryScoreList extends ScoreList
|
|||||||
public void recompute()
|
public void recompute()
|
||||||
{
|
{
|
||||||
list.clear();
|
list.clear();
|
||||||
getObservable().notifyListeners();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user