Commit Graph

6 Enmetoj

Author SHA1 Message Date
Jaidyn Ann f0ce3e87c6 Support generally setting own nick, own UserItems
Seperate UserItems are now created for each list, too, rather than a
single one being created per-user. This functionally works a lot nicer.

But onto more important things… now setting the user's own nick should
work quite well. Finally. =w=

This has given me a good bit of trouble over the past couple of days―
setting the user's nick *worked*, but it wouldn't propagate to its
corresponding UserItem nor its UserInfoDialog. It would, however, work
with the StatusView.

These are all registered Observers of the User itself, so if one works,
they *all* should, them all being registered to the same User.

Now, if a given User isn't found in the ProtocolLooper's user-list,
the Conversation class will take it upon itself to create a new
one and add it to both of their respective lists.

So the user's own contact would be set in the ProtocolLooper― but it
*wouldn't* be added to the user-list.

Hilarity ensues as two seperate objects for the user's own contact would
be created.

Since the StatusView is registered to the ProtocolLooper's "real" own contact
slot, it would receive all updates… but since Conversations' user-lists and
items would be registered to the Conversation-created "fake" user, they
would be borked.

Simple oversight, but wow it hecked with me. :P
2021-08-05 14:28:56 -05:00
Jaidyn Ann fbe6e66743 Change class names 2021-06-20 12:44:20 -05:00
Jaidyn Ann 89905fe23c Show/receive room subjects, show protocol icon in conversation view
The conversation view now displays the protocol icon and room subject.
Messages for receiving room names (IM_ROOM_NAME) and subjects
(IM_ROOM_SUBJECT) were added, and support for the latter was given to
the XMPP add-on.

New message APIs were added, and several (room-related) im_what values were
moved into the 150s/160s.

UserItem::_TintColor() was moved to CayaUtils, because it can be used in
several different contexts.
2021-06-04 13:57:04 -05:00
Jaidyn Ann e00164c1aa Recolor user's item when status changes 2021-06-03 23:41:23 -05:00
Jaidyn Ann ad1c7b5782 Receive lists and changes in room participants from protocols
Two new messages were added to the protocol API to do this:
M_ROOM_PARTICIPANTS, which can be used when someone joins a room, or
on joining a room to send a full list of users, and IM_ROOM_PARTICIPANT_LEFT,
for when a user has left the room/disconnected.

IM_SET_STATUS no longer assumes received data comes from contacts, but
any general user.

UserItem was made to reflect changes in the User's name.

Chat messages can now be reliably received in a given room. :)
2021-06-02 16:53:03 -05:00
Jaidyn Ann 63d8bbef26 Add user-list to the conversation view, menu tweaks
UserListView and UserItem were added as the backbone of the user-list,
and the (currently unused) Caya message CAYA_SEND_INVITE was established
for inviting users to rooms.

Some menus were reworked (e.g., pop-ups of the RosterListView) or
generally tweaked to be more sensical or consistent.
2021-05-31 10:50:43 -05:00