First of all, I’m enjoying Thunkable X and the awsome community here!
Now… some weird stuff “of course” maybe some Thunkable gods like @domhnallohanlon can help!
The ideia: push notifications will be stored in a mysql database and replicated to local datasource , in the app, user can view, mark as read/unread and delete notifications… everything is fine here, the problems is not related to push itself or OneSignal.
I’m using a Web API
component that calls PHP script to get/update the database.
A Data Source (local table)
is used to store a “clone” of mysql rows. For this, at “sync process”, I delete all rows in my Data Source, and insert the new ones from list that came from Web API, as JSON… all using a stored variable
as list
to store the local row id’s.
A Data Viewer List
to display notifications… and that’s where the are two problems:
1. When new notification is inserted in MySQL database with no notifications in local data source
. Clicking the reload button
… new row is created, as you can see the row id, on the top label
. But, the Data Viewer List
shows “no data found”. Then I close app, open it again, and the data is there.
2. When reopen app, the message is ok. Clicking the reload button
… I delete the local data source
rows and insert the new ones from API, but it’s like the displayed row was the deleted one, no contents is shown. Again, the new row was created as seen by the rowid on top label
. After swiping down on list, message is ok again.
Hoping to be a bug!
Thank in advance!!