remove duplicated code
This commit is contained in:
parent
3f29ca3b96
commit
9a1d7b2c9f
1 changed files with 1 additions and 7 deletions
|
@ -966,7 +966,7 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
if (timeView != null) { //must not exists
|
if (timeView != null) { //must not exists
|
||||||
timeView.setText(DateUtil.timeString(new Date()));
|
timeView.setText(DateUtil.timeString(new Date()));
|
||||||
}
|
}
|
||||||
if (!MainApp.getConfigBuilder().isProfileValid("Overview")) {// app not initialized yet
|
if (!MainApp.getConfigBuilder().isProfileValid("Overview")) {
|
||||||
pumpStatusView.setText(R.string.noprofileset);
|
pumpStatusView.setText(R.string.noprofileset);
|
||||||
pumpStatusLayout.setVisibility(View.VISIBLE);
|
pumpStatusLayout.setVisibility(View.VISIBLE);
|
||||||
loopStatusLayout.setVisibility(View.GONE);
|
loopStatusLayout.setVisibility(View.GONE);
|
||||||
|
@ -983,12 +983,6 @@ public class OverviewFragment extends Fragment implements View.OnClickListener,
|
||||||
final PumpInterface pump = ConfigBuilderPlugin.getActivePump();
|
final PumpInterface pump = ConfigBuilderPlugin.getActivePump();
|
||||||
|
|
||||||
final Profile profile = MainApp.getConfigBuilder().getProfile();
|
final Profile profile = MainApp.getConfigBuilder().getProfile();
|
||||||
if (profile == null) {
|
|
||||||
pumpStatusView.setText(R.string.noprofileset);
|
|
||||||
pumpStatusLayout.setVisibility(View.VISIBLE);
|
|
||||||
loopStatusLayout.setVisibility(View.GONE);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
final String units = profile.getUnits();
|
final String units = profile.getUnits();
|
||||||
final double lowLine = OverviewPlugin.getPlugin().determineLowLine(units);
|
final double lowLine = OverviewPlugin.getPlugin().determineLowLine(units);
|
||||||
|
|
Loading…
Reference in a new issue