Trigger fabric event on user request, not queuing time.

This commit is contained in:
Johannes Mockenhaupt 2018-03-28 22:12:14 +02:00
parent 52c6d209af
commit 014864f0db
No known key found for this signature in database
GPG key ID: 9E1EA6AF7BBBB0D1
2 changed files with 2 additions and 1 deletions

View file

@ -741,6 +741,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
profileSwitch.timeshift = timeshift;
profileSwitch.percentage = percentage;
MainApp.getConfigBuilder().addToHistoryProfileSwitch(profileSwitch);
FabricPrivacy.getInstance().logCustom(new CustomEvent("ProfileSwitch"));
}
public static void doProfileSwitch(final int duration, final int percentage, final int timeshift) {
@ -757,6 +758,7 @@ public class NewNSTreatmentDialog extends DialogFragment implements View.OnClick
profileSwitch.timeshift = timeshift;
profileSwitch.percentage = percentage;
MainApp.getConfigBuilder().addToHistoryProfileSwitch(profileSwitch);
FabricPrivacy.getInstance().logCustom(new CustomEvent("ProfileSwitch"));
} else {
log.error("No profile switch existing");
}

View file

@ -668,7 +668,6 @@ public class ConfigBuilderPlugin implements PluginBase, TreatmentsInterface {
MainApp.bus().post(new EventNewBasalProfile());
}
});
FabricPrivacy.getInstance().logCustom(new CustomEvent("ProfileSwitch"));
}
@Override