inject instead of static get
This commit is contained in:
parent
389ef01861
commit
a12026c73e
|
@ -154,6 +154,7 @@ public class MainApp extends DaggerApplication {
|
|||
@Inject TreatmentsPlugin treatmentsPlugin;
|
||||
@Inject VirtualPumpPlugin virtualPumpPlugin;
|
||||
@Inject VersionCheckerPlugin versionCheckerPlugin;
|
||||
@Inject WearPlugin wearPlugin;
|
||||
|
||||
@Override
|
||||
public void onCreate() {
|
||||
|
@ -251,7 +252,7 @@ public class MainApp extends DaggerApplication {
|
|||
if (!Config.NSCLIENT) pluginsList.add(smsCommunicatorPlugin);
|
||||
pluginsList.add(FoodPlugin.getPlugin());
|
||||
|
||||
pluginsList.add(WearPlugin.initPlugin(this));
|
||||
pluginsList.add(wearPlugin);
|
||||
pluginsList.add(statusLinePlugin);
|
||||
pluginsList.add(PersistentNotificationPlugin.getPlugin());
|
||||
pluginsList.add(NSClientPlugin.getPlugin());
|
||||
|
|
|
@ -65,6 +65,7 @@ public class MyPreferenceFragment extends PreferenceFragment implements HasAndro
|
|||
@Inject StatusLinePlugin statusLinePlugin;
|
||||
@Inject TidepoolPlugin tidepoolPlugin;
|
||||
@Inject VirtualPumpPlugin virtualPumpPlugin;
|
||||
@Inject WearPlugin wearPlugin;
|
||||
|
||||
@Override
|
||||
public void setArguments(Bundle args) {
|
||||
|
@ -144,7 +145,7 @@ public class MyPreferenceFragment extends PreferenceFragment implements HasAndro
|
|||
addPreferencesFromResource(R.xml.pref_others);
|
||||
addPreferencesFromResource(R.xml.pref_datachoices);
|
||||
|
||||
addPreferencesFromResourceIfEnabled(WearPlugin.getPlugin(), PluginType.GENERAL);
|
||||
addPreferencesFromResourceIfEnabled(wearPlugin, PluginType.GENERAL);
|
||||
addPreferencesFromResourceIfEnabled(statusLinePlugin, PluginType.GENERAL);
|
||||
}
|
||||
|
||||
|
|
|
@ -140,6 +140,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
|||
@Inject TreatmentsPlugin treatmentsPlugin;
|
||||
@Inject IobCobCalculatorPlugin iobCobCalculatorPlugin;
|
||||
@Inject NotificationStore notificationStore;
|
||||
@Inject ActionStringHandler actionStringHandler;
|
||||
|
||||
private CompositeDisposable disposable = new CompositeDisposable();
|
||||
|
||||
|
@ -967,7 +968,7 @@ public class OverviewFragment extends DaggerFragment implements View.OnClickList
|
|||
(NotificationManager) mainApp.getSystemService(Context.NOTIFICATION_SERVICE);
|
||||
notificationManager.cancel(Constants.notificationID);
|
||||
|
||||
ActionStringHandler.handleInitiate("cancelChangeRequest");
|
||||
actionStringHandler.handleInitiate("cancelChangeRequest");
|
||||
}
|
||||
|
||||
private void updatePumpStatus(String status) {
|
||||
|
|
Loading…
Reference in a new issue