Merge pull request #373 from MilosKozak/profile-switch-viewer
Profile switch viewer update
This commit is contained in:
commit
6c8e957a33
|
@ -33,16 +33,16 @@ import info.nightscout.utils.DecimalFormatter;
|
||||||
public class ProfileViewDialog extends DialogFragment {
|
public class ProfileViewDialog extends DialogFragment {
|
||||||
private static Logger log = LoggerFactory.getLogger(ProfileViewDialog.class);
|
private static Logger log = LoggerFactory.getLogger(ProfileViewDialog.class);
|
||||||
|
|
||||||
private static TextView noProfile;
|
private TextView noProfile;
|
||||||
private static TextView units;
|
private TextView units;
|
||||||
private static TextView dia;
|
private TextView dia;
|
||||||
private static TextView activeProfile;
|
private TextView activeProfile;
|
||||||
private static TextView ic;
|
private TextView ic;
|
||||||
private static TextView isf;
|
private TextView isf;
|
||||||
private static TextView basal;
|
private TextView basal;
|
||||||
private static TextView target;
|
private TextView target;
|
||||||
|
|
||||||
private static Button refreshButton;
|
private Button refreshButton;
|
||||||
|
|
||||||
Handler mHandler;
|
Handler mHandler;
|
||||||
static HandlerThread mHandlerThread;
|
static HandlerThread mHandlerThread;
|
||||||
|
|
|
@ -30,18 +30,18 @@ public class ProfileViewerDialog extends DialogFragment {
|
||||||
|
|
||||||
private static Logger log = LoggerFactory.getLogger(ProfileViewDialog.class);
|
private static Logger log = LoggerFactory.getLogger(ProfileViewDialog.class);
|
||||||
|
|
||||||
private static TextView noProfile;
|
private TextView noProfile;
|
||||||
private static TextView units;
|
private TextView units;
|
||||||
private static TextView dia;
|
private TextView dia;
|
||||||
private static TextView activeProfile;
|
private TextView activeProfile;
|
||||||
private static TextView ic;
|
private TextView ic;
|
||||||
private static TextView isf;
|
private TextView isf;
|
||||||
private static TextView basal;
|
private TextView basal;
|
||||||
private static TextView target;
|
private TextView target;
|
||||||
private static View dateDelimiter;
|
private View dateDelimiter;
|
||||||
private static LinearLayout dateLayout;
|
private LinearLayout dateLayout;
|
||||||
private static TextView dateTextView;
|
private TextView dateTextView;
|
||||||
private static Button refreshButton;
|
private Button refreshButton;
|
||||||
|
|
||||||
static ProfileViewerDialog newInstance(long time) {
|
static ProfileViewerDialog newInstance(long time) {
|
||||||
ProfileViewerDialog dialog = new ProfileViewerDialog();
|
ProfileViewerDialog dialog = new ProfileViewerDialog();
|
||||||
|
@ -88,7 +88,7 @@ public class ProfileViewerDialog extends DialogFragment {
|
||||||
private void setContent() {
|
private void setContent() {
|
||||||
Profile profile = null;
|
Profile profile = null;
|
||||||
ProfileSwitch profileSwitch = MainApp.getConfigBuilder().getProfileSwitchFromHistory(time);
|
ProfileSwitch profileSwitch = MainApp.getConfigBuilder().getProfileSwitchFromHistory(time);
|
||||||
if(profileSwitch!=null){
|
if(profileSwitch!=null && profileSwitch.profileJson != null){
|
||||||
profile = profileSwitch.getProfileObject();
|
profile = profileSwitch.getProfileObject();
|
||||||
}
|
}
|
||||||
if (profile != null) {
|
if (profile != null) {
|
||||||
|
@ -105,9 +105,4 @@ public class ProfileViewerDialog extends DialogFragment {
|
||||||
noProfile.setVisibility(View.VISIBLE);
|
noProfile.setVisibility(View.VISIBLE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue