If deferred unsubscriptions are removed during FetchExternalUpdatesAsync, user data will not be saved after calling RemoveDeferredUnsubscription. This causes the SDK to process the same deferred unsubscription again every time it is initialized, unless user data is saved due to another reason.
I ran into this while I was testing network error handling. I performed an unsubscribe operation in my game's UI after disabling the internet connection. Afterwards, every time I would open my game's mod browser, the SDK would process the same deferred unsubscription every time.
I noticed this while investigating #19.
There should either be a call to SaveUserDataToStorageAsync after the following loop (probably conditional on any deferred unsubscriptions having been removed):
|
while (Modio::Detail::SDKSessionData::HasDeferredUnsubscriptions()) |
Or alternatively, UnsubscribeFromModAsync should call RemoveDeferredUnsubscription before it saves the user data:
|
Modio::Detail::SDKSessionData::InvalidateSubscriptionCache(); |
If deferred unsubscriptions are removed during
FetchExternalUpdatesAsync, user data will not be saved after callingRemoveDeferredUnsubscription. This causes the SDK to process the same deferred unsubscription again every time it is initialized, unless user data is saved due to another reason.I ran into this while I was testing network error handling. I performed an unsubscribe operation in my game's UI after disabling the internet connection. Afterwards, every time I would open my game's mod browser, the SDK would process the same deferred unsubscription every time.
I noticed this while investigating #19.
There should either be a call to
SaveUserDataToStorageAsyncafter the following loop (probably conditional on any deferred unsubscriptions having been removed):modio-sdk/modio/modio/detail/ops/FetchExternalUpdates.h
Line 45 in dd3147e
Or alternatively,
UnsubscribeFromModAsyncshould callRemoveDeferredUnsubscriptionbefore it saves the user data:modio-sdk/modio/modio/detail/ops/UnsubscribeFromMod.h
Line 97 in dd3147e