mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-12 15:24:39 +00:00
parent
ba49b2ec20
commit
a8f2a3cb08
@ -71,7 +71,7 @@ method init*(self: Controller) =
|
||||
|
||||
self.events.on(chat_service.SIGNAL_CHAT_LEFT) do(e: Args):
|
||||
let args = chat_service.ChatArgs(e)
|
||||
self.delegate.removeChat(args.chatId)
|
||||
self.delegate.onCommunityChannelDeletedOrChatLeft(args.chatId)
|
||||
|
||||
self.events.on(SIGNAL_CONTACT_ADDED) do(e: Args):
|
||||
var args = ContactArgs(e)
|
||||
@ -105,7 +105,7 @@ method init*(self: Controller) =
|
||||
self.events.on(SIGNAL_COMMUNITY_CHANNEL_DELETED) do(e:Args):
|
||||
let args = CommunityChatIdArgs(e)
|
||||
if (args.communityId == self.sectionId):
|
||||
self.delegate.onCommunityChannelDeleted(args.chatId)
|
||||
self.delegate.onCommunityChannelDeletedOrChatLeft(args.chatId)
|
||||
|
||||
self.events.on(SIGNAL_COMMUNITY_CHANNEL_EDITED) do(e:Args):
|
||||
let args = CommunityChatArgs(e)
|
||||
@ -171,12 +171,8 @@ method setActiveItemSubItem*(self: Controller, itemId: string, subItemId: string
|
||||
|
||||
self.delegate.activeItemSubItemSet(self.activeItemId, self.activeSubItemId)
|
||||
|
||||
method removeChat*(self: Controller, itemId: string) =
|
||||
if self.isCommunitySection:
|
||||
self.communityService.deleteCommunityChat(self.getMySectionId(), itemId)
|
||||
# else:
|
||||
# not implemented
|
||||
# self.chatService.deleteChatById(itemId)
|
||||
method removeCommunityChat*(self: Controller, itemId: string) =
|
||||
self.communityService.deleteCommunityChat(self.getMySectionId(), itemId)
|
||||
|
||||
method getOneToOneChatNameAndImage*(self: Controller, chatId: string):
|
||||
tuple[name: string, image: string, isIdenticon: bool] =
|
||||
|
@ -42,7 +42,7 @@ method getChatDetailsForChatTypes*(self: AccessInterface, types: seq[ChatType]):
|
||||
method setActiveItemSubItem*(self: AccessInterface, itemId: string, subItemId: string) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method removeChat*(self: AccessInterface, itemId: string) {.base.} =
|
||||
method removeCommunityChat*(self: AccessInterface, itemId: string) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method getOneToOneChatNameAndImage*(self: AccessInterface, chatId: string):
|
||||
|
@ -356,13 +356,13 @@ method addNewChat*(
|
||||
# make new added chat active one
|
||||
self.setActiveItemSubItem(item.id, "")
|
||||
|
||||
method removeChat*(self: Module, chatId: string) =
|
||||
method removeCommunityChat*(self: Module, chatId: string) =
|
||||
if(not self.chatContentModules.contains(chatId)):
|
||||
return
|
||||
|
||||
self.controller.removeChat(chatId)
|
||||
self.controller.removeCommunityChat(chatId)
|
||||
|
||||
method onCommunityChannelDeleted*(self: Module, chatId: string) =
|
||||
method onCommunityChannelDeletedOrChatLeft*(self: Module, chatId: string) =
|
||||
if(not self.chatContentModules.contains(chatId)):
|
||||
return
|
||||
self.view.chatsModel().removeItemById(chatId)
|
||||
|
@ -32,7 +32,7 @@ method onContactBlocked*(self: AccessInterface, publicKey: string) {.base.} =
|
||||
method onContactDetailsUpdated*(self: AccessInterface, contactId: string) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method onCommunityChannelDeleted*(self: AccessInterface, chatId: string) {.base.} =
|
||||
method onCommunityChannelDeletedOrChatLeft*(self: AccessInterface, chatId: string) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method onChatRenamed*(self: AccessInterface, chatId: string, newName: string) {.base.} =
|
||||
|
@ -21,7 +21,7 @@ method createOneToOneChat*(self: AccessInterface, chatId: string, ensName: strin
|
||||
method leaveChat*(self: AccessInterface, chatId: string) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method removeChat*(self: AccessInterface, chatId: string) {.base.} =
|
||||
method removeCommunityChat*(self: AccessInterface, chatId: string) {.base.} =
|
||||
raise newException(ValueError, "No implementation available")
|
||||
|
||||
method getActiveChatId*(self: AccessInterface): string {.base.} =
|
||||
|
@ -157,8 +157,8 @@ QtObject:
|
||||
proc blockContact*(self: View, publicKey: string) {.slot.} =
|
||||
self.delegate.blockContact(publicKey)
|
||||
|
||||
proc removeChat*(self: View, chatId: string) {.slot} =
|
||||
self.delegate.removeChat(chatId)
|
||||
proc removeCommunityChat*(self: View, chatId: string) {.slot} =
|
||||
self.delegate.removeCommunityChat(chatId)
|
||||
|
||||
proc addGroupMembers*(self: View, chatId: string, pubKeys: string) {.slot.} =
|
||||
self.delegate.addGroupMembers(chatId, pubKeys)
|
||||
|
@ -193,7 +193,7 @@ QtObject {
|
||||
return globalUtils.plainText(text)
|
||||
}
|
||||
|
||||
function removeChat(chatId) {
|
||||
chatCommunitySectionModule.removeChat(chatId)
|
||||
function removeCommunityChat(chatId) {
|
||||
chatCommunitySectionModule.removeCommunityChat(chatId)
|
||||
}
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ ColumnLayout {
|
||||
chatContentModule.leaveChat()
|
||||
}
|
||||
|
||||
onDeleteChat: root.rootStore.removeChat(chatId)
|
||||
onDeleteCommunityChat: root.rootStore.removeCommunityChat(chatId)
|
||||
|
||||
onDownloadMessages: {
|
||||
// Not Refactored Yet
|
||||
|
@ -31,7 +31,7 @@ StatusPopupMenu {
|
||||
signal markAllMessagesRead(string chatId)
|
||||
signal clearChatHistory(string chatId)
|
||||
signal downloadMessages(string file)
|
||||
signal deleteChat(string chatId)
|
||||
signal deleteCommunityChat(string chatId)
|
||||
signal leaveChat(string chatId)
|
||||
|
||||
signal openPinnedMessagesList(string chatId)
|
||||
@ -222,7 +222,7 @@ StatusPopupMenu {
|
||||
}
|
||||
onConfirmButtonClicked: {
|
||||
if(root.isCommunityChat)
|
||||
root.deleteChat(root.chatId)
|
||||
root.deleteCommunityChat(root.chatId)
|
||||
else
|
||||
root.leaveChat(root.chatId)
|
||||
|
||||
|
@ -302,7 +302,7 @@ Item {
|
||||
root.communitySectionModule.leaveChat(chatId)
|
||||
}
|
||||
|
||||
onDeleteChat: root.store.removeChat(chatId)
|
||||
onDeleteCommunityChat: root.store.removeCommunityChat(chatId)
|
||||
|
||||
onDownloadMessages: {
|
||||
// Not Refactored Yet
|
||||
|
@ -281,7 +281,7 @@ Item {
|
||||
root.chatSectionModule.leaveChat(chatId)
|
||||
}
|
||||
|
||||
onDeleteChat: {
|
||||
onDeleteCommunityChat: {
|
||||
// Not Refactored Yet
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user