cmeng-git / atalk-android

xmpp/jabber client for android
Apache License 2.0
159 stars 59 forks source link

Status of contacts is not refreshed after going offline #141

Closed MilanKral closed 4 years ago

MilanKral commented 4 years ago

After the network connectivity is lost the Status in Action Bar is correctly displayed as offline. But all the contacts are displayed as online.

Only after disabling and enabling the account in "Account settings..." menu are the contact statuses correctly displayed as offline.

cmeng-git commented 4 years ago

This is expected behaviour. The contacts statuses are actually get updated by the \ sent from server. When a user is disconnected, there is no way aTalk knows the status of the contact. So the contacts statuses remain as they were. When user login in again. All contacts statuses are clear and await for server update.

Also when a user get disconnected, this does not mean all contacts are also offline. Therefore aTalk cannot just auto clear contacts status when itself get disconnected.

MilanKral commented 4 years ago

I'm interested in the following scenario:

  1. You have a aTalk client configured with "Hide offline contacts"
  2. You have a second client
  3. Both aTalk and the second client are not running.
  4. Start aTalk. aTalk will start and connect.
  5. Start the second client. The second client starts and is connected.
  6. In the aTalk contact list the contact of second client is not visible. But it should be visible.
  7. aTalk can receive messages from the second client and can also reply, but the contact is still not visible in the contact list.
cmeng-git commented 4 years ago

Actually I have already fixed this problem for the next release. The fix also will reorder the contact so the online contacts are listed first.

cmeng-git commented 4 years ago

aTalk v2.2.4 released. Please verify

MilanKral commented 4 years ago

The issue is fixed in aTalk v2.2.4