Chat List
Join or start a public chat
key source file: ui/app/AppLayouts/Chat/ContactsColumn/AddChat.qml
key source file: ui/app/AppLayouts/Chat/ContactsColumn.qml
key source file: ui/app/AppLayouts/Chat/components/PublicChatPopup.qml
key source file: src/app/chat/view.nim
key source file: src/status/chat.nim
key source file: src/status/libstatus/chat.nim
The public channel is joined by calling chatsModel.joinChat(channelName.text, Constants.chatTypePublic)
On the backend, the join action calls status_chat.saveChat
, and adds a mailserver optic, it also emits a channelJoined
event which will cause the UI to display that new channel
Search for a Chat
key source file: ui/app/AppLayouts/Chat/ContactsColumn/AddChat.qml
key source file: ui/app/AppLayouts/Chat/ContactsColumn/ChannelList.qml
key source file: ui/app/AppLayouts/Chat/ContactsColumn/Channel.qml
The searchbox is aliased to as searchStr
property alias searchStr: searchBox.text
The ChannelList receives this as a paramter to the chat list and this is then passed to each member of the channel list
ChannelList {
id: channelList
searchStr: contactsColumn.searchStr.toLowerCase()
channelModel: chatsModel.chats
}
The filtering works by checking the search string against the channel name and using this to set the item as visible or invisible
property bool isVisible: searchStr === "" || name.includes(searchStr)
Suggested Channels
key source file: ui/app/AppLayouts/Chat/data/channelList.js
key source file: ui/app/AppLayouts/Chat/ContactsColumn/EmptyView.qml
key source file: ui/app/AppLayouts/Chat/components/SuggestedChannels.qml
key source file: ui/app/AppLayouts/Chat/components/SuggestedChannel.qml
Badges
key source file: ui/app/AppLayouts/Chat/ContactsColumn/Channel.qml
unread message counter
key source file: ui/app/AppLayouts/Chat/ContactsColumn/ChannelList.qml#
key source file: src/status/chat/chat.nim
This information comes from the property unviewedMessagesCount
which is defined for each channel on the channelListContent.channelModel
mentions @
key source file: ui/app/AppLayouts/Chat/ContactsColumn/ChannelList.qml#
key source file: src/status/chat/chat.nim
This information comes from the property hasMentions
which is defined for each channel on the channelListContent.channelModel
Context menu
key source file: ui/app/AppLayouts/Chat/ContactsColumn/Channel.qml
key source file: ui/app/AppLayouts/Chat/ContactsColumn/ChannelList.qml
key source file: ui/app/AppLayouts/Chat/components/ChannelContextMenu.qml