Netvent / storyly-sdk

Storyly allows mobile applications to have in-app stories in native iOS, native Android, React-Native, and Flutter platforms.
68 stars 39 forks source link

storylyLoaded method called with empty storyGroupList #378

Open mike192 opened 3 weeks ago

mike192 commented 3 weeks ago

storylyLoaded method of StorylyListener is called a few times after initialization of Storyly. If it's a fresh install of the app then the first callback is called with the empty storyGroupList. For the next cold app launches we get the following sequence of callbacks and the data:

  1. dataSource - LOCAL, storyGroupList - non-empty
  2. dataSource - API, storyGroupList - empty
  3. dataSource - API, storyGroupList - non-empty

We want to analyze the data and check when story groups are empty (for real empty). Because of the issue mentioned before we get the wrong data, since the story groups are almost always non-empty, and the information about their emptiness is incorrect.

Environment Details

Storyly SDK Version: 3.4.2 Android SDK Version: 34 Device Model: It doesn't matter, but it was tested on Samsung S10 Device OS Version: API 33 Additional Info: ---

Expected Behavior

Method storylyLoaded with empty data should be called only if there is no data. From what I know iOS SDK handles it this way.

Current Behavior

Currently the method storylyLoaded with empty storyGroupList is called with storyGroupList after StorylyWidget initialization.

Steps to Reproduce

  1. Implement StorylyListener
  2. Log argument storyGroupList in storylyLoaded method.
  3. Init the Storyly view for the first time