diff --git a/src/app/modules/main/app_search/controller.nim b/src/app/modules/main/app_search/controller.nim index e621300c95..94d829f0b0 100644 --- a/src/app/modules/main/app_search/controller.nim +++ b/src/app/modules/main/app_search/controller.nim @@ -112,13 +112,13 @@ proc searchMessages*(self: Controller, searchTerm: string) = if (self.searchLocation != singletonInstance.userProfile.getPubKey()): communities.add(self.searchLocation) else: - let types = @[ChatType.OneToOne, ChatType.Public, ChatType.PrivateGroupChat] + let types = @[ChatType.OneToOne, ChatType.PrivateGroupChat] let displayedChats = self.getChatDetailsForChatTypes(types) for c in displayedChats: chats.add(c.id) if (communities.len == 0 and chats.len == 0): - let types = @[ChatType.OneToOne, ChatType.Public, ChatType.PrivateGroupChat] + let types = @[ChatType.OneToOne, ChatType.PrivateGroupChat] let displayedChats = self.getChatDetailsForChatTypes(types) for c in displayedChats: chats.add(c.id) diff --git a/src/app/modules/main/browser_section/provider/module.nim b/src/app/modules/main/browser_section/provider/module.nim index f3fe84bc3b..bb68e21151 100644 --- a/src/app/modules/main/browser_section/provider/module.nim +++ b/src/app/modules/main/browser_section/provider/module.nim @@ -12,7 +12,7 @@ import ../../../../../app_service/service/provider/service as provider_service import ../../../../global/global_singleton export io_interface -# Shouldn't be public ever, user only within this module. +# Shouldn't be public ever, use only within this module. type TmpSendTransactionDetails = object payloadMethod: string requestType: string diff --git a/src/app/modules/main/chat_section/chat_content/users/controller.nim b/src/app/modules/main/chat_section/chat_content/users/controller.nim index 8b2d2b9b55..8e657027d2 100644 --- a/src/app/modules/main/chat_section/chat_content/users/controller.nim +++ b/src/app/modules/main/chat_section/chat_content/users/controller.nim @@ -86,21 +86,7 @@ proc init*(self: Controller) = let chat = self.getChat() - # Events only for public chats - if chat.isPublicChat(): - self.events.on(SIGNAL_MESSAGES_LOADED) do(e:Args): - let args = MessagesLoadedArgs(e) - if(self.chatId != args.chatId): - return - self.delegate.onNewMessagesLoaded(args.messages) - - self.events.on(SIGNAL_NEW_MESSAGE_RECEIVED) do(e:Args): - let args = MessagesArgs(e) - if(self.chatId != args.chatId): - return - self.delegate.onNewMessagesLoaded(args.messages) - - # Events only for the user list, so not needed in public and one to one chats + # Events only for the user list, so not needed in one to one chats if(self.isUsersListAvailable): self.events.on(SIGNAL_CONTACT_UNTRUSTWORTHY) do(e: Args): var args = TrustArgs(e) diff --git a/src/app/modules/main/chat_section/chat_content/users/module.nim b/src/app/modules/main/chat_section/chat_content/users/module.nim index e02cb60304..00180115d4 100644 --- a/src/app/modules/main/chat_section/chat_content/users/module.nim +++ b/src/app/modules/main/chat_section/chat_content/users/module.nim @@ -65,30 +65,6 @@ method viewDidLoad*(self: Module) = method getModuleAsVariant*(self: Module): QVariant = return self.viewVariant -method onNewMessagesLoaded*(self: Module, messages: seq[MessageDto]) = - for m in messages: - if(self.view.model().isContactWithIdAdded(m.`from`)): - continue - - let contactDetails = self.controller.getContactDetails(m.`from`) - let statusUpdateDto = self.controller.getStatusForContact(m.`from`) - let status = toOnlineStatus(statusUpdateDto.statusType) - self.view.model().addItem(initMemberItem( - pubKey = m.`from`, - displayName = contactDetails.details.displayName, - ensName = contactDetails.details.name, - localNickname = contactDetails.details.localNickname, - alias = contactDetails.details.alias, - icon = contactDetails.icon, - colorId = contactDetails.colorId, - colorHash = contactDetails.colorHash, - onlineStatus = status, - isContact = contactDetails.details.isContact, - isVerified = contactDetails.details.isContactVerified(), - isUntrustworthy = contactDetails.details.trustStatus == TrustStatus.Untrustworthy, - ) - ) - method contactNicknameChanged*(self: Module, publicKey: string) = let contactDetails = self.controller.getContactDetails(publicKey) self.view.model().setName( diff --git a/src/app/modules/main/chat_section/controller.nim b/src/app/modules/main/chat_section/controller.nim index a58fd03859..ade5002ad5 100644 --- a/src/app/modules/main/chat_section/controller.nim +++ b/src/app/modules/main/chat_section/controller.nim @@ -302,13 +302,6 @@ proc getOneToOneChatNameAndImage*(self: Controller, chatId: string): tuple[name: string, image: string, largeImage: string] = return self.chatService.getOneToOneChatNameAndImage(chatId) -proc createPublicChat*(self: Controller, chatId: string) = - let response = self.chatService.createPublicChat(chatId) - if(response.success): - self.delegate.addChatIfDontExist(response.chatDto, false, self.events, self.settingsService, self.nodeConfigurationService, - self.contactService, self.chatService, self.communityService, self.messageService, - self.gifService, self.mailserversService) - proc createOneToOneChat*(self: Controller, communityID: string, chatId: string, ensName: string) = let response = self.chatService.createOneToOneChat(communityID, chatId, ensName) if(response.success): diff --git a/src/app/modules/main/chat_section/io_interface.nim b/src/app/modules/main/chat_section/io_interface.nim index 561ed3765e..2334a9f361 100644 --- a/src/app/modules/main/chat_section/io_interface.nim +++ b/src/app/modules/main/chat_section/io_interface.nim @@ -160,9 +160,6 @@ method isCommunity*(self: AccessInterface): bool {.base.} = method getMySectionId*(self: AccessInterface): string {.base.} = raise newException(ValueError, "No implementation available") -method createPublicChat*(self: AccessInterface, chatId: string) {.base.} = - raise newException(ValueError, "No implementation available") - method switchToOrCreateOneToOneChat*(self: AccessInterface, chatId: string) {.base.} = raise newException(ValueError, "No implementation available") diff --git a/src/app/modules/main/chat_section/module.nim b/src/app/modules/main/chat_section/module.nim index 030c5c2245..abe53ebade 100644 --- a/src/app/modules/main/chat_section/module.nim +++ b/src/app/modules/main/chat_section/module.nim @@ -144,8 +144,7 @@ proc buildChatSectionUI( var colorHash: ColorHashDto = @[] var colorId: int = 0 var onlineStatus = OnlineStatus.Inactive - let isUsersListAvailable = (chatDto.chatType != ChatType.OneToOne and - chatDto.chatType != ChatType.Public) + let isUsersListAvailable = chatDto.chatType != ChatType.OneToOne var blocked = false let belongToCommunity = chatDto.communityId != "" if(chatDto.chatType == ChatType.OneToOne): @@ -412,17 +411,6 @@ method onActiveSectionChange*(self: Module, sectionId: string) = method chatsModel*(self: Module): chats_model.Model = return self.view.chatsModel() -method createPublicChat*(self: Module, chatId: string) = - if(self.controller.isCommunity()): - debug "creating public chat is not allowed for community, most likely it's an error in qml", methodName="createPublicChat" - return - - if(self.chatContentModules.hasKey(chatId)): - self.setActiveItemSubItem(chatId, "") - return - - self.controller.createPublicChat(chatId) - method addNewChat*( self: Module, chatDto: ChatDto, @@ -788,8 +776,6 @@ method onNewMessagesReceived*(self: Module, sectionIdMsgBelongsTo: string, chatI var notificationTitle = contactDetails.defaultDisplayName case chatDetails.chatType: - of ChatType.Public: - notificationTitle.add(fmt" ({chatDetails.name})") of ChatType.PrivateGroupChat: notificationTitle.add(fmt" ({chatDetails.name})") of ChatType.CommunityChat: diff --git a/src/app/modules/main/chat_section/view.nim b/src/app/modules/main/chat_section/view.nim index e843ae017d..c209349842 100644 --- a/src/app/modules/main/chat_section/view.nim +++ b/src/app/modules/main/chat_section/view.nim @@ -141,9 +141,6 @@ QtObject: return chatContentVariant - proc createPublicChat*(self: View, chatId: string) {.slot.} = - self.delegate.createPublicChat(chatId) - proc createOneToOneChat*(self: View, communityID: string, chatId: string, ensName: string) {.slot.} = self.delegate.createOneToOneChat(communityID, chatId, ensName) diff --git a/src/app/modules/main/profile_section/ens_usernames/module.nim b/src/app/modules/main/profile_section/ens_usernames/module.nim index 5fcc20d3bb..8e79e10b92 100644 --- a/src/app/modules/main/profile_section/ens_usernames/module.nim +++ b/src/app/modules/main/profile_section/ens_usernames/module.nim @@ -23,7 +23,7 @@ include ../../../../../app_service/common/json_utils const cancelledRequest* = "cancelled" -# Shouldn't be public ever, user only within this module. +# Shouldn't be public ever, use only within this module. type TmpSendEnsTransactionDetails = object ensUsername: string address: string diff --git a/src/app/modules/main/stickers/module.nim b/src/app/modules/main/stickers/module.nim index b09b31c940..119bcd0f4d 100644 --- a/src/app/modules/main/stickers/module.nim +++ b/src/app/modules/main/stickers/module.nim @@ -14,7 +14,7 @@ export io_interface const cancelledRequest* = "cancelled" -# Shouldn't be public ever, user only within this module. +# Shouldn't be public ever, use only within this module. type TmpBuyStickersTransactionDetails = object packId: string address: string diff --git a/src/app/modules/main/wallet_section/transactions/module.nim b/src/app/modules/main/wallet_section/transactions/module.nim index ad60990e70..195e0c822f 100644 --- a/src/app/modules/main/wallet_section/transactions/module.nim +++ b/src/app/modules/main/wallet_section/transactions/module.nim @@ -13,7 +13,7 @@ export io_interface const cancelledRequest* = "cancelled" -# Shouldn't be public ever, user only within this module. +# Shouldn't be public ever, use only within this module. type TmpSendTransactionDetails = object fromAddr: string toAddr: string diff --git a/src/app_service/service/chat/dto/chat.nim b/src/app_service/service/chat/dto/chat.nim index f9d50e9ff3..875914aa91 100644 --- a/src/app_service/service/chat/dto/chat.nim +++ b/src/app_service/service/chat/dto/chat.nim @@ -270,7 +270,11 @@ proc toChannelGroupDto*(jsonObj: JsonNode): ChannelGroupDto = var chatsObj: JsonNode if(jsonObj.getProp("chats", chatsObj)): for _, chatObj in chatsObj: - result.chats.add(toChatDto(chatObj)) + let chat = toChatDto(chatObj) + if (chat.chatType == ChatType.Public): + # Filter out public chats as we don't show them anymore + continue + result.chats.add(chat) var categoriesObj: JsonNode if(jsonObj.getProp("categories", categoriesObj)): @@ -307,9 +311,6 @@ proc toChatDto*(jsonObj: JsonNode, communityId: string): ChatDto = if communityId != "": result.id = communityId & result.id.replace(communityId, "") # Adding communityID prefix in case it's not available -proc isPublicChat*(chatDto: ChatDto): bool = - return chatDto.chatType == ChatType.Public - proc isOneToOneChat*(chatDto: ChatDto): bool = return chatDto.chatType == ChatType.OneToOne diff --git a/src/app_service/service/chat/service.nim b/src/app_service/service/chat/service.nim index 5a90f06b77..11e85d1d22 100644 --- a/src/app_service/service/chat/service.nim +++ b/src/app_service/service/chat/service.nim @@ -165,7 +165,11 @@ QtObject: for chat in chats: if chat.active and chat.chatType != chat_dto.ChatType.Unknown: - self.chats[chat.id] = chat + if chat.chatType == chat_dto.ChatType.Public: + # Deactivate old public chats + discard status_chat.deactivateChat(chat.id) + else: + self.chats[chat.id] = chat except Exception as e: let errDesription = e.msg error "error: ", errDesription @@ -293,17 +297,6 @@ QtObject: self.updateOrAddChat(result.chatDto) result.success = true - proc createPublicChat*(self: Service, chatId: string): tuple[chatDto: ChatDto, success: bool] = - try: - let response = status_chat.createPublicChat(chatId) - result.chatDto = response.result.toChatDto() - self.updateOrAddChat(result.chatDto) - result.success = true - except Exception as e: - let errDesription = e.msg - error "error: ", errDesription - return - proc createOneToOneChat*(self: Service, communityID: string, chatId: string, ensName: string): tuple[chatDto: ChatDto, success: bool] = try: if self.hasChannel(chatId): diff --git a/src/backend/chat.nim b/src/backend/chat.nim index d8b667d4be..cf89f73c68 100644 --- a/src/backend/chat.nim +++ b/src/backend/chat.nim @@ -36,11 +36,6 @@ proc getChats*(): RpcResponse[JsonNode] {.raises: [Exception].} = let payload = %* [] result = callPrivateRPC("chat_getChats", payload) -proc createPublicChat*(chatId: string): RpcResponse[JsonNode] {.raises: [Exception].} = - let communityId = "" - let payload = %* [communityId, chatId] - result = callPrivateRPC("chat_joinChat", payload) - proc createOneToOneChat*(chatId: string, ensName: string = ""): RpcResponse[JsonNode] {.raises: [Exception].} = let communityId = "" let payload = %* [communityId, chatId, ensName] diff --git a/ui/StatusQ/sandbox/controls/Controls.qml b/ui/StatusQ/sandbox/controls/Controls.qml index f45f562a68..c67f5b8531 100644 --- a/ui/StatusQ/sandbox/controls/Controls.qml +++ b/ui/StatusQ/sandbox/controls/Controls.qml @@ -185,13 +185,6 @@ GridLayout { type: StatusChatInfoButton.Type.GroupChat } - StatusChatInfoButton { - title: "public-chat" - subTitle: "Public Chat" - asset.color: Theme.palette.miscColor7 - type: StatusChatInfoButton.Type.PublicChat - } - StatusChatInfoButton { title: "community-channel" subTitle: "Community Chat" diff --git a/ui/StatusQ/sandbox/demoapp/StatusAppChatView.qml b/ui/StatusQ/sandbox/demoapp/StatusAppChatView.qml index 130a9c2809..8d58f335a3 100644 --- a/ui/StatusQ/sandbox/demoapp/StatusAppChatView.qml +++ b/ui/StatusQ/sandbox/demoapp/StatusAppChatView.qml @@ -134,24 +134,6 @@ StatusSectionLayout { Layout.fillWidth: true } - - StatusRoundButton { - Layout.alignment: Qt.AlignVCenter - icon.name: "public-chat" - icon.color: Theme.palette.directColor1 - icon.height: editBtn.icon.height - icon.width: editBtn.icon.width - implicitWidth: editBtn.implicitWidth - implicitHeight: editBtn.implicitHeight - type: StatusRoundButton.Type.Tertiary - StatusToolTip { - text: qsTr("Join public chats") - visible: parent.hovered - orientation: StatusToolTip.Orientation.Bottom - y: parent.height + 12 - } - } - StatusIconTabButton { id: editBtn icon.name: "edit" diff --git a/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml b/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml index c8ddcdea7a..7804790188 100644 --- a/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml +++ b/ui/StatusQ/src/StatusQ/Components/StatusChatListItem.qml @@ -31,7 +31,7 @@ Rectangle { charactersLen: root.type === StatusChatListItem.Type.OneToOneChat ? 2 : 1 } property alias ringSettings: identicon.ringSettings - property int type: StatusChatListItem.Type.PublicChat + property int type: StatusChatListItem.Type.Unknown0 property bool highlighted: false property bool highlightWhenCreated: false property bool selected: false @@ -123,8 +123,6 @@ Rectangle { icon: { switch (root.type) { - case StatusChatListItem.Type.PublicChat: - return Theme.palette.name === "light" ? "tiny/public-chat" : "tiny/public-chat-white" case StatusChatListItem.Type.GroupChat: return Theme.palette.name === "light" ? "tiny/group" : "tiny/group-white" case StatusChatListItem.Type.CommunityChat: @@ -144,10 +142,7 @@ Rectangle { anchors.rightMargin: 6 anchors.verticalCenter: parent.verticalCenter - text: (root.type === StatusChatListItem.Type.PublicChat && - !root.name.startsWith("#") ? - "#" + root.name : - root.name) + text: root.name elide: Text.ElideRight color: { if (root.muted && !hoverHander.hovered && !root.highlighted) { diff --git a/ui/StatusQ/src/StatusQ/Controls/StatusChatInfoButton.qml b/ui/StatusQ/src/StatusQ/Controls/StatusChatInfoButton.qml index 4d0ae42af9..f0a84b0f18 100644 --- a/ui/StatusQ/src/StatusQ/Controls/StatusChatInfoButton.qml +++ b/ui/StatusQ/src/StatusQ/Controls/StatusChatInfoButton.qml @@ -25,7 +25,7 @@ Button { } property alias ringSettings: identicon.ringSettings - property int type: StatusChatInfoButton.Type.PublicChat + property int type: StatusChatInfoButton.Type.Unknown0 property alias tooltip: statusToolTip signal pinnedMessagesCountClicked(var mouse) @@ -101,9 +101,7 @@ Button { objectName: "statusChatInfoButtonNameText" Layout.fillWidth: true elide: Text.ElideRight - text: root.type === StatusChatInfoButton.Type.PublicChat && !root.title.startsWith("#") ? - "#" + root.title - : root.title + text: root.title color: root.muted ? Theme.palette.directColor5 : Theme.palette.directColor1 font.weight: Font.Medium } diff --git a/ui/app/AppLayouts/Chat/popups/PublicChatPopup.qml b/ui/app/AppLayouts/Chat/popups/PublicChatPopup.qml deleted file mode 100644 index 209f4404de..0000000000 --- a/ui/app/AppLayouts/Chat/popups/PublicChatPopup.qml +++ /dev/null @@ -1,115 +0,0 @@ -import QtQuick 2.13 -import QtQuick.Controls 2.13 -import QtQuick.Layouts 1.13 - -import utils 1.0 -import shared.controls 1.0 - -import StatusQ.Core 0.1 -import StatusQ.Controls 0.1 -import StatusQ.Controls.Validators 0.1 - -import shared.panels 1.0 -import shared.popups 1.0 -import "../helpers/channelList.js" as ChannelJSON -import "../panels" - -// TODO: replace with StatusModal -ModalPopup { - signal joinPublicChat(string name) - signal suggestedMessageClicked(string channel) - function validate() { - channelName.validate(true) - return channelName.valid - } - - function doJoin() { - if (!validate()) { - return - } - popup.joinPublicChat(channelName.text); - popup.close(); - } - - id: popup - title: qsTr("Join public chat") - - onOpened: { - channelName.text = ""; - channelName.input.edit.forceActiveFocus(Qt.MouseFocusReason) - } - - contentWrapper.anchors.bottomMargin: 0 - - Row { - id: description - Layout.fillHeight: false - Layout.fillWidth: true - width: parent.width - - StyledText { - width: parent.width - font.pixelSize: 15 - text: qsTr("A public chat is where you get to hang out with others, make friends and talk about subjects of your interest.") - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignTop - } - } - - StatusInput { - id: channelName - input.edit.objectName: "joinPublicChannelInput" - anchors.top: description.bottom - anchors.topMargin: Style.current.padding - placeholderText: qsTr("chat-name") - charLimit: 24 - Keys.onEnterPressed: doJoin() - Keys.onReturnPressed: doJoin() - input.asset.name: "channel" - validators: [StatusMinLengthValidator { - minLength: 1 - errorMessage: qsTr("You need to enter a channel name") - }, - StatusValidator { - name: "validChannelNameValidator" - validate: function (t) { return Utils.isValidChannelName(t) } - errorMessage: qsTr("The channel name can only contain lowercase letters, numbers and dashes") - }] - validationMode: StatusInput.ValidationMode.OnlyWhenDirty - } - - StatusScrollView { - id: sview - - anchors.top: channelName.bottom - anchors.topMargin: Style.current.smallPadding - anchors.left: parent.left - anchors.right: parent.right - anchors.bottom: parent.bottom - ScrollBar.horizontal.policy: ScrollBar.AlwaysOff - ScrollBar.vertical.policy: ScrollBar.AlwaysOn - contentHeight: { - var totalHeight = 0 - for (let i = 0; i < sectionRepeater.count; i++) { - totalHeight += sectionRepeater.itemAt(i).height + Style.current.padding - } - return totalHeight + Style.current.padding - } - - SuggestedChannelsPanel { - id: sectionRepeater - width: sview.width - onSuggestedMessageClicked: { - popup.suggestedMessageClicked(channel); - } - } - } - - footer: StatusButton { - objectName: "startChatButton" - anchors.bottom: parent.bottom - anchors.right: parent.right - onClicked : doJoin() - text: qsTr("Start chat") - } -} diff --git a/ui/app/AppLayouts/Chat/views/ChatHeaderContentView.qml b/ui/app/AppLayouts/Chat/views/ChatHeaderContentView.qml index b87a0466ba..9cd1726cc9 100644 --- a/ui/app/AppLayouts/Chat/views/ChatHeaderContentView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatHeaderContentView.qml @@ -88,7 +88,7 @@ Item { StatusFlatRoundButton { id: membersButton visible: { - if(!chatContentModule || chatContentModule.chatDetails.type === Constants.chatType.publicChat) + if(!chatContentModule) return false return localAccountSensitiveSettings.showOnlineUsers && @@ -278,10 +278,8 @@ Item { return "" // In some moment in future this should be part of the backend logic. - // (once we add transaltion on the backend side) + // (once we add translation on the backend side) switch (chatContentModule.chatDetails.type) { - case Constants.chatType.publicChat: - return qsTr("Public chat") case Constants.chatType.privateGroupChat: return qsTr("%n member(s)", "", chatContentModule.usersModule.model.count) case Constants.chatType.communityChat: @@ -330,8 +328,7 @@ Item { if(!chatContentModule) return false - return chatContentModule.chatDetails.type !== Constants.chatType.publicChat && - chatContentModule.chatDetails.type !== Constants.chatType.communityChat && + return chatContentModule.chatDetails.type !== Constants.chatType.communityChat && chatContentModule.chatDetails.type !== Constants.chatType.privateGroupChat } onClicked: { diff --git a/ui/app/AppLayouts/Chat/views/ChatView.qml b/ui/app/AppLayouts/Chat/views/ChatView.qml index ed9b0457a0..2724504fdf 100644 --- a/ui/app/AppLayouts/Chat/views/ChatView.qml +++ b/ui/app/AppLayouts/Chat/views/ChatView.qml @@ -102,10 +102,7 @@ StatusSectionLayout { } let chatContentModule = root.rootStore.currentChatContentModule() - if (!chatContentModule - || chatContentModule.chatDetails.type === Constants.chatType.publicChat) - { - // New communities have no chats, so no chatContentModule or it is a public chat + if (!chatContentModule) { return false } // Check if user list is available as an option for particular chat content module diff --git a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml index d827750daf..cabb8ecccc 100644 --- a/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml +++ b/ui/app/AppLayouts/Chat/views/ContactsColumnView.qml @@ -64,26 +64,6 @@ Item { Layout.fillWidth: true } - StatusRoundButton { - Layout.alignment: Qt.AlignVCenter - icon.name: "public-chat" - icon.color: Theme.palette.directColor1 - icon.height: startChatButton.icon.height - icon.width: startChatButton.icon.width - implicitWidth: startChatButton.implicitWidth - implicitHeight: startChatButton.implicitHeight - type: StatusRoundButton.Type.Tertiary - - onClicked: Global.openPopup(publicChatPopupComponent) - - StatusToolTip { - text: qsTr("Join public chats") - visible: parent.hovered - orientation: StatusToolTip.Orientation.Bottom - y: parent.height + 12 - } - } - StatusIconTabButton { id: startChatButton Layout.alignment: Qt.AlignVCenter @@ -243,23 +223,6 @@ Item { } } - Component { - id: publicChatPopupComponent - PublicChatPopup { - onJoinPublicChat: { - chatSectionModule.createPublicChat(name) - close() - } - onSuggestedMessageClicked: { - chatSectionModule.createPublicChat(channel) - close() - } - onClosed: { - destroy() - } - } - } - Component { id: communitiesPopupComponent CommunitiesPopup { diff --git a/ui/app/mainui/activitycenter/controls/ChannelBadge.qml b/ui/app/mainui/activitycenter/controls/ChannelBadge.qml index 78d0532b93..c14a933d48 100644 --- a/ui/app/mainui/activitycenter/controls/ChannelBadge.qml +++ b/ui/app/mainui/activitycenter/controls/ChannelBadge.qml @@ -47,8 +47,7 @@ Badge { StatusIcon { Layout.preferredWidth: 16 Layout.preferredHeight: 16 - icon: chatType === Constants.chatType.publicChat ? "tiny/public-chat" - : "tiny/group" + icon: "tiny/group" color: Theme.palette.baseColor1 } @@ -60,9 +59,7 @@ Badge { StyledText { Layout.alignment: Qt.AlignVCenter - text: chatType !== Constants.chatType.publicChat ? - StatusQUtils.Emoji.parse(StatusQUtils.Utils.filterXSS(name)) : - "#" + StatusQUtils.Utils.filterXSS(name) + text: StatusQUtils.Emoji.parse(StatusQUtils.Utils.filterXSS(name)) color: Theme.palette.baseColor1 font.weight: Font.Medium diff --git a/ui/imports/assets/icons/public_chat.svg b/ui/imports/assets/icons/public_chat.svg deleted file mode 100644 index d1536720ba..0000000000 --- a/ui/imports/assets/icons/public_chat.svg +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/ui/imports/shared/status/StatusChatInput.qml b/ui/imports/shared/status/StatusChatInput.qml index c372027c17..14b6602559 100644 --- a/ui/imports/shared/status/StatusChatInput.qml +++ b/ui/imports/shared/status/StatusChatInput.qml @@ -1062,7 +1062,7 @@ Rectangle { Layout.bottomMargin: 4 icon.name: "image" type: StatusQ.StatusFlatRoundButton.Type.Tertiary - visible: !isEdit && control.chatType !== Constants.chatType.publicChat + visible: !isEdit enabled: !control.isContactBlocked onClicked: { highlighted = true diff --git a/ui/imports/shared/status/StatusNotification.qml b/ui/imports/shared/status/StatusNotification.qml index 8dd25fd807..493f027b8a 100644 --- a/ui/imports/shared/status/StatusNotification.qml +++ b/ui/imports/shared/status/StatusNotification.qml @@ -15,7 +15,7 @@ Rectangle { property string chatId: "" property string name: "channelName" property string message: "My latest message\n with a return" - property int chatType: Constants.chatType.publicChat + property int chatType: Constants.chatType.unknown color: "#F7F7F7" width: 366 diff --git a/ui/imports/shared/views/chat/MessageContextMenuView.qml b/ui/imports/shared/views/chat/MessageContextMenuView.qml index 907e3ba395..35c4fa0c27 100644 --- a/ui/imports/shared/views/chat/MessageContextMenuView.qml +++ b/ui/imports/shared/views/chat/MessageContextMenuView.qml @@ -29,7 +29,7 @@ StatusMenu { property string selectedUserDisplayName: "" property string selectedUserIcon: "" - property int chatType: Constants.chatType.publicChat + property int chatType: Constants.chatType.unknown property string messageId: "" property string unparsedText: "" property string messageSenderId: "" @@ -411,8 +411,6 @@ StatusMenu { return true switch (root.chatType) { - case Constants.chatType.publicChat: - return false case Constants.chatType.profile: return false case Constants.chatType.oneToOne: