From 7710da6c89f975d7bf34efae340232fdb9a705a5 Mon Sep 17 00:00:00 2001 From: Green Sky Date: Thu, 18 Apr 2024 15:16:12 +0200 Subject: [PATCH] add comps root private and group --- src/solanaceae/contact/components.hpp | 11 +++++++++++ src/solanaceae/contact/components_id.inl | 3 +++ 2 files changed, 14 insertions(+) diff --git a/src/solanaceae/contact/components.hpp b/src/solanaceae/contact/components.hpp index 3b309f3..1d42011 100644 --- a/src/solanaceae/contact/components.hpp +++ b/src/solanaceae/contact/components.hpp @@ -12,8 +12,17 @@ namespace Contact::Components { struct TagSelfWeak {}; struct TagSelfStrong {}; + + // root node contact (like an account) + struct TagRoot {}; + // hint to display this contact in the contact list struct TagBig {}; + // indicates to the UI, that this should be displayed like a 1to1 chat + struct TagPrivate {}; + // indicates to the UI to show the subs list by default (overwritten by TagPrivate) + struct TagGroup {}; + struct RequestIncoming { bool name = false; bool password = false; @@ -31,6 +40,8 @@ namespace Contact::Components { }; // TODO: maybe rename to children + // subs are not exclusive (only is some protocols) + // this is not an indicator of a groupchat struct ParentOf { std::vector subs; }; diff --git a/src/solanaceae/contact/components_id.inl b/src/solanaceae/contact/components_id.inl index e95a42f..c9e4cc9 100644 --- a/src/solanaceae/contact/components_id.inl +++ b/src/solanaceae/contact/components_id.inl @@ -20,7 +20,10 @@ constexpr std::string_view entt::type_name::value() noexcept { \ DEFINE_COMP_ID(Contact::Components::TagSelfWeak) DEFINE_COMP_ID(Contact::Components::TagSelfStrong) +DEFINE_COMP_ID(Contact::Components::TagRoot) DEFINE_COMP_ID(Contact::Components::TagBig) +DEFINE_COMP_ID(Contact::Components::TagPrivate) +DEFINE_COMP_ID(Contact::Components::TagGroup) DEFINE_COMP_ID(Contact::Components::RequestIncoming) DEFINE_COMP_ID(Contact::Components::TagRequestOutgoing) DEFINE_COMP_ID(Contact::Components::Self)