From 4df4a229970dbb029ebd04d77c2d8d502af34afc Mon Sep 17 00:00:00 2001 From: Milos Kozak Date: Thu, 4 Aug 2016 19:33:09 +0200 Subject: [PATCH] profileviewer cleanup --- .../plugins/NSProfileViewer/NSProfileViewerFragment.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/info/nightscout/androidaps/plugins/NSProfileViewer/NSProfileViewerFragment.java b/app/src/main/java/info/nightscout/androidaps/plugins/NSProfileViewer/NSProfileViewerFragment.java index 70a02c0be2..c1703ab726 100644 --- a/app/src/main/java/info/nightscout/androidaps/plugins/NSProfileViewer/NSProfileViewerFragment.java +++ b/app/src/main/java/info/nightscout/androidaps/plugins/NSProfileViewer/NSProfileViewerFragment.java @@ -111,8 +111,7 @@ public class NSProfileViewerFragment extends Fragment implements PluginBase, Pro } public static NSProfileViewerFragment newInstance() { - NSProfileViewerFragment fragment = new NSProfileViewerFragment(); - return fragment; + return new NSProfileViewerFragment(); } private void setContent() { @@ -161,7 +160,7 @@ public class NSProfileViewerFragment extends Fragment implements PluginBase, Pro SharedPreferences.Editor editor = settings.edit(); editor.putString("profile", profile.getData().toString()); editor.putString("activeProfile", profile.getActiveProfile()); - editor.commit(); + editor.apply(); if (Config.logPrefsChange) log.debug("Storing profile"); }