EionRobb / purple-mattermost

A libpurple/Pidgin plugin for Mattermost
GNU General Public License v3.0
93 stars 23 forks source link

separate buddies from channels #75

Closed AlexeyGusev closed 6 years ago

AlexeyGusev commented 6 years ago

Pidgin shows a mix of end users (those that are under DIRECT MESSAGES category in mattermost client) and subscribed channels (private and public) in one list, A-Z sorted. My proposal is to show channels/rooms in the end of the list or in Chat subsection (however, channels end up in a Chat subsection when they are "added" from the room list. Don't know which way is better, maybe subscribed channels should be "added" automatically).

jaroslawp commented 6 years ago

this changed a little in the v4 api branch now: ordering is as follows : first alphabetical list of channels in first team (unfortunately group channels are inserted in between due to sort order) then in next team(s) (if any), then direct channels (buddies) in alphabetical order: all that inserted in "Mattermost" group.

This is only initial ordering (you can move away your ~/.purple/blist.xml to get it again). After that all this information is displayed in order stored by libpurple/pidgin (in that blist.xml) and can be changed by dragging elements in the user list.

I have tried to get this ordered on per server basis plus separating by public/private/group/direct categories.. but in my opinion this results in a way too cluttered user interface look ... (2 MM servers x 4 categories = 8 separate contact groups ..). so after trying it for a while I kind of abandoned this idea ... I think that leaving the ordering to the user works better here ...

(now, probably adding a hint to names of private channels may be something sensible ? .., group ones are easily distinguishable by name)

AlexeyGusev commented 6 years ago

yeah, but keeping group channels separate from private channels/buddies would greatly improve usability, even if both are kept inside the same group, just two lists following one another.

jaroslawp commented 6 years ago

OK, I think I got something alike this: https://github.com/EionRobb/purple-mattermost/commit/ea49f1c0507bc0c4e48b8146dc5e411531a1526c (disclaimer: this is really untested code, works for me with libpurple2, have not tried with 3 ...). If you want to give it a try: move away ~/.purple/blist.xml first

AlexeyGusev commented 6 years ago

tested in https://github.com/EionRobb/purple-mattermost/commit/ea49f1c0507bc0c4e48b8146dc5e411531a1526c and https://github.com/EionRobb/purple-mattermost/commit/a64a9b475ae821900323f5e4020fee9b9590d2fd removed ~/.purple/blist.xml, channels/buddies are still sorted in alphabetical order and there is no separation between rooms/private users.

EionRobb commented 6 years ago

Sorting is controlled by the UI/Pidgin, not by prpls. Try (from the Buddy List), Buddies->Sort Buddies->By status...

AlexeyGusev commented 6 years ago

@EionRobb ah, perfect! That's it, thank you.