Closed cristan closed 4 years ago
The onSubmit event is triggered before the actual submission of the screen-set form. Your updated account will be available after the form has completed its task and triggers the "onHide" event with a "finished" reason.
I've tried waiting for the "onHide" event with a "finished" reason. This sometimes works: sometimes I get the updated account right away, but sometimes I still get the old product info. The odds seem about 50/50. Is there any way to always get the updated user?
Use this interface:
public void getAccount(final boolean invalidateCache, GigyaCallback
You are my hero! Getting the user with invalidateCache
set to true
after an onHide
event with a "finished"
reason indeed did the trick. (I ended up using the constant GigyaDefinitions.Plugin.FINISHED
instead of just hardcoding "finished"
BTW). It would be better if the cache would always be invalidated after the user has updated their account, but for now this works.
Hi, Glad to see that this solves your issue. Will take your suggestion into consideration in future tasks. Thanks, Tal.
If I call
gigya.showScreenSet(Constants.GIGYA_SCREEN_SET_ACCOUNT_DETAILS
, set thegigyaPluginCallback
and callgigya.getAccount
atonAfterSubmit
, I don't get an updated account. I do when I callgigya.getAccount
about a second later. I don't want to wait an arbitrary amount of time and try to call the backend then in the hopes that the account has been updated by then. Therefore: please add a way users of your SDK can get a callback on where the account is updated to.