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 {
|
||||
private static Logger log = LoggerFactory.getLogger(ProfileViewDialog.class);
|
||||
|
||||
private static TextView noProfile;
|
||||
private static TextView units;
|
||||
private static TextView dia;
|
||||
private static TextView activeProfile;
|
||||
private static TextView ic;
|
||||
private static TextView isf;
|
||||
private static TextView basal;
|
||||
private static TextView target;
|
||||
private TextView noProfile;
|
||||
private TextView units;
|
||||
private TextView dia;
|
||||
private TextView activeProfile;
|
||||
private TextView ic;
|
||||
private TextView isf;
|
||||
private TextView basal;
|
||||
private TextView target;
|
||||
|
||||
private static Button refreshButton;
|
||||
private Button refreshButton;
|
||||
|
||||
Handler mHandler;
|
||||
static HandlerThread mHandlerThread;
|
||||
|
|
|
@ -30,18 +30,18 @@ public class ProfileViewerDialog extends DialogFragment {
|
|||
|
||||
private static Logger log = LoggerFactory.getLogger(ProfileViewDialog.class);
|
||||
|
||||
private static TextView noProfile;
|
||||
private static TextView units;
|
||||
private static TextView dia;
|
||||
private static TextView activeProfile;
|
||||
private static TextView ic;
|
||||
private static TextView isf;
|
||||
private static TextView basal;
|
||||
private static TextView target;
|
||||
private static View dateDelimiter;
|
||||
private static LinearLayout dateLayout;
|
||||
private static TextView dateTextView;
|
||||
private static Button refreshButton;
|
||||
private TextView noProfile;
|
||||
private TextView units;
|
||||
private TextView dia;
|
||||
private TextView activeProfile;
|
||||
private TextView ic;
|
||||
private TextView isf;
|
||||
private TextView basal;
|
||||
private TextView target;
|
||||
private View dateDelimiter;
|
||||
private LinearLayout dateLayout;
|
||||
private TextView dateTextView;
|
||||
private Button refreshButton;
|
||||
|
||||
static ProfileViewerDialog newInstance(long time) {
|
||||
ProfileViewerDialog dialog = new ProfileViewerDialog();
|
||||
|
@ -88,7 +88,7 @@ public class ProfileViewerDialog extends DialogFragment {
|
|||
private void setContent() {
|
||||
Profile profile = null;
|
||||
ProfileSwitch profileSwitch = MainApp.getConfigBuilder().getProfileSwitchFromHistory(time);
|
||||
if(profileSwitch!=null){
|
||||
if(profileSwitch!=null && profileSwitch.profileJson != null){
|
||||
profile = profileSwitch.getProfileObject();
|
||||
}
|
||||
if (profile != null) {
|
||||
|
@ -105,9 +105,4 @@ public class ProfileViewerDialog extends DialogFragment {
|
|||
noProfile.setVisibility(View.VISIBLE);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue