eusoulevi / emite

Automatically exported from code.google.com/p/emite
0 stars 0 forks source link

Different listeners in Roster for subscription and presence changes #31

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

When a RosterItem changes either the presence or the subscription states,
the onItemChanged method in RosterListeners is called.

Maybe we should change this behaviour and create to methods in
rosterListener: onItemPresenceChanged y onItemSubscriptionChanged

I think its not a good idea because add complexity to RosterListener and i
can't see any scenario where this is needed.

any ideas?

Original issue reported on code.google.com by danigb on 24 Apr 2008 at 5:06

GoogleCodeExporter commented 9 years ago
The current problem:

- User A request to add User B:

- User B accept the subscription request and user A receive his presence/status
(available):

Updating roster item: vjrj@emitedemo.ourproject.org, name: vjrj-e, subsc: to
[INFO] PRESENCE: type: available, from:
vjrj@emitedemo.ourproject.org/emiteui-1209585754894-r405-7, show: chat, status: 
null
(procesed after RosterChanged or RosterItemChanged)

- User A accept user B request to subscription and receives the server 
confirmation:

[INFO] PRESENCE: type: subscribed, from: vjrj@emitedemo.ourproject.org, show:
notSpecified, status: null (procesed after RosterChanged or RosterItemChanged)

Result: 
- user A has (?) unknown presence status from user B (because the last 
subscribed
presence reset the previous available presence).
- user B has correct presence status from user A

What to do? Different listeners can be a solution
- Changes of subscription ---> must change UI menu of operations (maybe the 
status
text if we show subscription description) but not the icon or status
- Changes of presences.Type/Show --> must change icon and roster item status 
text in
UI (maybe also the menu).

Also I think that roster item don't have to store subscribed/unsubscribed type 
(in
RosterItem.setPresence

If it's not clear... ;)

Original comment by vruiz.ju...@gmail.com on 30 Apr 2008 at 8:31

GoogleCodeExporter commented 9 years ago
Fixed without two listeners. If you think is necessary, reopen the issue. 

Original comment by vruiz.ju...@gmail.com on 16 May 2008 at 9:40