|
|
@ -41,7 +41,7 @@ import org.jetbrains.annotations.*;
|
|
|
|
import static org.isoron.uhabits.utils.InterfaceUtils.*;
|
|
|
|
import static org.isoron.uhabits.utils.InterfaceUtils.*;
|
|
|
|
|
|
|
|
|
|
|
|
public class HistoryEditorDialog extends AppCompatDialogFragment
|
|
|
|
public class HistoryEditorDialog extends AppCompatDialogFragment
|
|
|
|
implements DialogInterface.OnClickListener, ModelObservable.Listener
|
|
|
|
implements DialogInterface.OnClickListener
|
|
|
|
{
|
|
|
|
{
|
|
|
|
@Nullable
|
|
|
|
@Nullable
|
|
|
|
private Habit habit;
|
|
|
|
private Habit habit;
|
|
|
@ -115,19 +115,6 @@ public class HistoryEditorDialog extends AppCompatDialogFragment
|
|
|
|
return builder.create();
|
|
|
|
return builder.create();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onModelChange()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
refreshData();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onPause()
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
habit.getComputedEntries().observable.removeListener(this);
|
|
|
|
|
|
|
|
super.onPause();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onResume()
|
|
|
|
public void onResume()
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -140,9 +127,7 @@ public class HistoryEditorDialog extends AppCompatDialogFragment
|
|
|
|
int height = Math.min(metrics.heightPixels, maxHeight);
|
|
|
|
int height = Math.min(metrics.heightPixels, maxHeight);
|
|
|
|
|
|
|
|
|
|
|
|
getDialog().getWindow().setLayout(width, height);
|
|
|
|
getDialog().getWindow().setLayout(width, height);
|
|
|
|
|
|
|
|
|
|
|
|
refreshData();
|
|
|
|
refreshData();
|
|
|
|
habit.getComputedEntries().observable.addListener(this);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|