Dear friends:
I found in the web a small app,something like WhatsApp,but very simple,it only allows to send and receive text messages.
I want to use it only with my friends and it's working just fine.
Now i want to add a new function:
To delete one item at a time, this means that when the ListVIew with the whole chat is displayed,i can select one item and delete it from the ListView and permanently from CloudDB.
But i'm doing something wrong because when i select any item, the complete chat is erased.
I'm using the method ListView.AfterPicking.
Everything is working fine.
Here is the block of the ListVIew.AfterPicking event.
Any help or idea is welcome.
There is no method to delete a specific item from a list stored in the value of a tag, you can only append a value to the list, or remove the first item of the list (there are method blocks for this in CloudDB.
To remove a specific item from the stored list, you will need to load the list from the tag's value, remove the specific item using blocks, then set the edited list to the value of the tag (store value). This runs the risk of someone else trying to edit the tag's list on CloudDB while you are doing this. To overcome this problem, you would need to change your approach, either individual messages in individual tags, or consider using Firebase realtime database (or Firestore - steep learning curve...), which is more readily designed and more flexible for "chat" type apps.
With the issue of deleting an item from a ListView forgotten, now i would like to do this:
When the whole list is displayed, i want to set a different background color for each member of the group.
For example,
if Charles has joined, his postings must be in Green.
if John has joined, his postings in blue.
if Rafael has joined, his postings in magenta.
and so on.
How can i do that? If this is viable.
If you join your chat list elements with separator \n (<br>?) then do text replaces of each name with that name wrapped with the appropriate color code markup, you would get something close to what you want.
You can do this even fancier with SVG graphics in a Web Viewer.
Search this board for instream SVG feed samples.