My firebase can't update my local list variable

Good evening! I am a student from HK. I get in trouble on a bug…
I make a forum system and users could comment on it. The comment will be saved to firebase. Besides, I make a label to show the total number of comments currently.
However, this label has a bug when I comment on it and then change the screen. The mobile phone screenshots are as following:

First Time open this screen:

Upload two comment:

Change to other screen and then come back:

My partial codes are as following:




Screenshot_5

at Initial level you have set all are empty list, but whenever screen initialize you need to set these global variable to create empty list. Try once

Screenshot_6

Like this, if not it will create trouble. You have to be very cautious with the lists

I try to set the list variables to be empty list when screen initialize, but seems that the bug still exists… :sob:
image

Can you share your aia here or in PM, i will solve it… Different positions that empty list need to set it then after analyzing full coding

Screenshot_7

this list alone set as empty in the screen initialize

Yes, here is my aia file. The problem exists in ScreenQandAQuestion1. Thank you!
Medical (1).aia (151.4 KB)

ok pls be patient for few min. I will revert back soon

Here is my fireDB properties. I use the default setting so I haven’t change anything on property.

this is not, console.firebase> realtimedatabase… Huahhhh Huge blocks. The problem is after storing values in tinyDB arises… so need to focus on lit… system doesnot respond properly…

Screenshot_8

Oh, but I haven’t set my own firebase and then connect it with kodular. I just insert the firebase component to kodular and keep the default setting. It seems that kodular will provide me a default firebase server.

Seems to be new to hear… and, may be, that is the problem… Surely it will end with problem. try to implement your own fireDB

Also you can minimize the blocks… Huge blocks mean, it could be very difficult to found the problem associate to which block… First you design fireDB structure and i will give you simple blocks

Also , i cannot to anywhere store tinyDB block. All the place i able to see get tinyDB tag…

opps. Sorry about that. I haven’t made a userlogin system. The tinyDB will store the user information(name and usertype) after the user login. Therefore, I make a temporary tinyDB store when the screen initialize. Make everything like the user logined already.

I tried to make my own firebase, but I don’t know why it always fails…

What problem you are facing…

Read this guide…

Firebase Database | A Guide for Beginners<<

Thank you! Let me try to build my own firebase to see whether it fixes the probelm.