refactor(@desktop/general): dto should not be `ref object`
This commit is contained in:
parent
05cf431339
commit
4c96bc70ed
|
@ -132,9 +132,7 @@ method load*[T](self: Module[T]) =
|
||||||
echo "=> communitiesSection"
|
echo "=> communitiesSection"
|
||||||
let communities = self.controller.getCommunities()
|
let communities = self.controller.getCommunities()
|
||||||
for c in communities:
|
for c in communities:
|
||||||
self.view.addItem(initItem(c.id, SectionType.Community.int, c.name,
|
self.view.addItem(initItem(c.id, SectionType.Community.int, c.name, c.images.thumbnail, "", c.color, 0, 0))
|
||||||
if not c.images.isNil: c.images.thumbnail else: "",
|
|
||||||
"", c.color, 0, 0))
|
|
||||||
|
|
||||||
echo "=> chatSection"
|
echo "=> chatSection"
|
||||||
self.chatSectionModule.load()
|
self.chatSectionModule.load()
|
||||||
|
|
|
@ -13,7 +13,7 @@ type ChatType* {.pure.}= enum
|
||||||
Timeline = 5
|
Timeline = 5
|
||||||
CommunityChat = 6
|
CommunityChat = 6
|
||||||
|
|
||||||
type ChatDto* = ref object
|
type ChatDto* = object
|
||||||
id*: string # ID is the id of the chat, for public chats it is the name e.g. status,
|
id*: string # ID is the id of the chat, for public chats it is the name e.g. status,
|
||||||
# for one-to-one is the hex encoded public key and for group chats is a random
|
# for one-to-one is the hex encoded public key and for group chats is a random
|
||||||
# uuid appended with the hex encoded pk of the creator of the chat
|
# uuid appended with the hex encoded pk of the creator of the chat
|
||||||
|
|
|
@ -5,15 +5,15 @@ import json
|
||||||
include ../../../common/json_utils
|
include ../../../common/json_utils
|
||||||
|
|
||||||
type
|
type
|
||||||
Permission* = ref object
|
Permission* = object
|
||||||
access*: int
|
access*: int
|
||||||
|
|
||||||
type
|
type
|
||||||
Images* = ref object
|
Images* = object
|
||||||
thumbnail*: string
|
thumbnail*: string
|
||||||
large*: string
|
large*: string
|
||||||
|
|
||||||
type Chat* = ref object
|
type Chat* = object
|
||||||
id*: string
|
id*: string
|
||||||
name*: string
|
name*: string
|
||||||
color*: string
|
color*: string
|
||||||
|
@ -25,16 +25,16 @@ type Chat* = ref object
|
||||||
position*: int
|
position*: int
|
||||||
categoryId*: string
|
categoryId*: string
|
||||||
|
|
||||||
type Category* = ref object
|
type Category* = object
|
||||||
id*: string
|
id*: string
|
||||||
name*: string
|
name*: string
|
||||||
position*: int
|
position*: int
|
||||||
|
|
||||||
type Member* = ref object
|
type Member* = object
|
||||||
id*: string
|
id*: string
|
||||||
roles*: seq[int]
|
roles*: seq[int]
|
||||||
|
|
||||||
type CommunityDto* = ref object
|
type CommunityDto* = object
|
||||||
id*: string
|
id*: string
|
||||||
admin*: bool
|
admin*: bool
|
||||||
verified*: bool
|
verified*: bool
|
||||||
|
|
Loading…
Reference in New Issue