fix: filter chats
This commit is contained in:
parent
2963e48366
commit
df037e489c
|
@ -62,17 +62,17 @@ proc loadChats*(): seq[Chat] =
|
||||||
|
|
||||||
echo "ACCESSING CHATS DIRECTLY ==============="
|
echo "ACCESSING CHATS DIRECTLY ==============="
|
||||||
let time = cpuTime()
|
let time = cpuTime()
|
||||||
let chats = status_go_chat.chats()
|
let chats = status_go_chat.chats().filterIt(it.active and it.chatType != status_go_chat.ChatType.Unknown)
|
||||||
let resTime1 = cpuTime() - time
|
let resTime1 = cpuTime() - time
|
||||||
echo "Time taken: ", resTime1
|
echo "Time taken: ", resTime1
|
||||||
|
|
||||||
# for c in chats:
|
for c in chats:
|
||||||
# echo "Chat: ......"
|
echo "Chat: ......"
|
||||||
# echo "- id: ", c.id
|
echo "- id: ", c.id
|
||||||
# echo "- timestamp: ", c.timestamp
|
echo "- timestamp: ", c.timestamp
|
||||||
# echo "- active: ", c.active
|
echo "- active: ", c.active
|
||||||
# echo "- name: ", c.name
|
echo "- name: ", c.name
|
||||||
# echo "- type: ", c.chatType
|
echo "- type: ", c.chatType
|
||||||
|
|
||||||
|
|
||||||
echo "Speedup improvement: ", resTime2 / resTime1 * 100, "%"
|
echo "Speedup improvement: ", resTime2 / resTime1 * 100, "%"
|
||||||
|
|
Loading…
Reference in New Issue