Chat

Chat


Chat log:

ONE TIME ACTION:

  1. GET all messages;
  2. Write list length to variable (messageCount);
  3. Add all messages to chat UI.

REPEATING ACTIONS:

  1. GET all messages;
  2. IF received messages list length > recorded messageCount THEN add only last messages that make a difference.

Contacts:

ONE TIME ACTION:

  1. GET all contacts;
  2. Write all contact IDs, Names and Online statuses to object array (allContacts);
  3. Add all Contacts to Sidebar ordered by Name.

REPEATING ACTIONS:

  1. GET all Contacts;
  2. Go through received Contacts and compare each:

2.1 Is it's present in allContacts?

2.2 Does display name is the same?

2.3 Does online status is the same?

IF any of these = false THEN remove Contact from Sidebar (if present) and replace it with new entry in the same place or add new contact in relevant place by Alphabet (if it was not present previously).

***IF search is in progress then these Updates will be NOT performed.

Report Page