backgroundTasksRunning.postValue(cnt > 0);
}
public static void setCurrentProfile(@NonNull MobileLedgerProfile newProfile) {
+ MLDB.setOption(MLDB.OPT_PROFILE_UUID, newProfile.getUuid());
+ profile.setValue(newProfile);
+ }
+ public static void postCurrentProfile(@NonNull MobileLedgerProfile newProfile) {
MLDB.setOption(MLDB.OPT_PROFILE_UUID, newProfile.getUuid());
profile.postValue(newProfile);
}
else
currencySymbolPosition.setValue(Currency.Position.none);
}
-
+ public static String formatNumber(float number) {
+ NumberFormat formatter = NumberFormat.getCurrencyInstance(locale.getValue());
+ return formatter.format(number);
+ }
public static void observeProfile(LifecycleOwner lifecycleOwner,
Observer<MobileLedgerProfile> observer) {
profile.observe(lifecycleOwner, observer);
MobileLedgerProfile startupProfile = getProfile(profileUUID);
if (startupProfile != null)
setCurrentProfile(startupProfile);
+ Logger.debug("profile", "initProfile() returning " + startupProfile);
return startupProfile;
}