chore: add some more logs to debug
This commit is contained in:
parent
057b6c2c0f
commit
7b1c7de309
|
@ -46,6 +46,7 @@ proc disconnect*(this: EventEmitter, handlerId: UUID) =
|
|||
this.events[k].del handlerId
|
||||
|
||||
proc emit*(this:EventEmitter, name:string, args:Args): void =
|
||||
echo "Emitting ", name
|
||||
if this.events.hasKey(name):
|
||||
# collect the handlers before executing them
|
||||
# because of 'once' proc, we also mutate
|
||||
|
|
|
@ -56,6 +56,7 @@ QtObject:
|
|||
self.processSignal(signal)
|
||||
|
||||
proc decode(self: SignalsManager, jsonSignal: JsonNode): Signal =
|
||||
echo jsonSignal
|
||||
let signalString = jsonSignal{"type"}.getStr
|
||||
var signalType: SignalType
|
||||
try:
|
||||
|
|
|
@ -179,7 +179,9 @@ proc init*(self: Controller) =
|
|||
var args = ChatUpdateArgs(e)
|
||||
for chat in args.chats:
|
||||
if self.chatId == chat.id:
|
||||
echo "Chat content"
|
||||
self.delegate.onChatEdited(chat)
|
||||
echo "Chat done"
|
||||
|
||||
proc getMyChatId*(self: Controller): string =
|
||||
return self.chatId
|
||||
|
|
|
@ -156,9 +156,11 @@ proc init*(self: Controller) =
|
|||
var args = ChatUpdateArgs(e)
|
||||
for chat in args.chats:
|
||||
let belongsToCommunity = chat.communityId.len > 0
|
||||
echo "Chat section"
|
||||
discard self.delegate.addOrUpdateChat(chat, belongsToCommunity, self.events, self.settingsService, self.nodeConfigurationService,
|
||||
self.contactService, self.chatService, self.communityService, self.messageService, self.gifService,
|
||||
self.mailserversService, setChatAsActive = false)
|
||||
echo "Chat section done"
|
||||
|
||||
self.events.on(SIGNAL_CHAT_CREATED) do(e: Args):
|
||||
var args = CreatedChatArgs(e)
|
||||
|
|
|
@ -80,7 +80,9 @@ proc init*(self: Controller) =
|
|||
self.events.on(SIGNAL_CHAT_UPDATE) do(e: Args):
|
||||
var args = ChatUpdateArgs(e)
|
||||
for chat in args.chats:
|
||||
echo "notifications"
|
||||
self.delegate.addChat(chat)
|
||||
echo "notifications done"
|
||||
|
||||
self.events.on(SIGNAL_CHAT_RENAMED) do(e: Args):
|
||||
var args = ChatRenameArgs(e)
|
||||
|
|
|
@ -133,8 +133,11 @@ method addChat*(self: Module, chatDto: ChatDto) =
|
|||
let ind = self.view.exemptionsModel().findIndexForItemId(chatDto.id)
|
||||
if(ind != -1):
|
||||
return
|
||||
echo "Create item"
|
||||
let item = self.createChatItem(chatDto)
|
||||
echo "created item"
|
||||
self.view.exemptionsModel().addItem(item)
|
||||
echo "added item"
|
||||
|
||||
method addChat*(self: Module, itemId: string) =
|
||||
let ind = self.view.exemptionsModel().findIndexForItemId(itemId)
|
||||
|
|
Loading…
Reference in New Issue