mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-05-11 13:15:05 +00:00
core, ui: short bio/description for contact and group profiles (#6055)
* core: short bio/description for contact and group profiles * use short description in commands * fix tests * query plans * ios: show contact and group profile descriptions * android, desktop: short description/bio * ui: layout for chat info, correct copy * comment out fields to add/edit short descriptions * remove short description from events * postgres schema
This commit is contained in:
@@ -11,6 +11,7 @@ import Simplex.Chat.Store.Postgres.Migrations.M20250513_group_scope
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20250526_short_links
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20250702_contact_requests_remove_cascade_delete
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20250704_groups_conn_link_prepared_connection
|
||||
import Simplex.Chat.Store.Postgres.Migrations.M20250709_profile_short_descr
|
||||
import Simplex.Messaging.Agent.Store.Shared (Migration (..))
|
||||
|
||||
schemaMigrations :: [(String, Text, Maybe Text)]
|
||||
@@ -21,7 +22,8 @@ schemaMigrations =
|
||||
("20250513_group_scope", m20250513_group_scope, Just down_m20250513_group_scope),
|
||||
("20250526_short_links", m20250526_short_links, Just down_m20250526_short_links),
|
||||
("20250702_contact_requests_remove_cascade_delete", m20250702_contact_requests_remove_cascade_delete, Just down_m20250702_contact_requests_remove_cascade_delete),
|
||||
("20250704_groups_conn_link_prepared_connection", m20250704_groups_conn_link_prepared_connection, Just down_m20250704_groups_conn_link_prepared_connection)
|
||||
("20250704_groups_conn_link_prepared_connection", m20250704_groups_conn_link_prepared_connection, Just down_m20250704_groups_conn_link_prepared_connection),
|
||||
("20250709_profile_short_descr", m20250709_profile_short_descr, Just down_m20250709_profile_short_descr)
|
||||
]
|
||||
|
||||
-- | The list of migrations in ascending order by date
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
{-# LANGUAGE QuasiQuotes #-}
|
||||
|
||||
module Simplex.Chat.Store.Postgres.Migrations.M20250709_profile_short_descr where
|
||||
|
||||
import Data.Text (Text)
|
||||
import qualified Data.Text as T
|
||||
import Text.RawString.QQ (r)
|
||||
|
||||
m20250709_profile_short_descr :: Text
|
||||
m20250709_profile_short_descr =
|
||||
T.pack
|
||||
[r|
|
||||
ALTER TABLE contact_profiles ADD COLUMN short_descr TEXT;
|
||||
ALTER TABLE group_profiles ADD COLUMN short_descr TEXT;
|
||||
|]
|
||||
|
||||
down_m20250709_profile_short_descr :: Text
|
||||
down_m20250709_profile_short_descr =
|
||||
T.pack
|
||||
[r|
|
||||
ALTER TABLE contact_profiles DROP COLUMN short_descr;
|
||||
ALTER TABLE group_profiles DROP COLUMN short_descr;
|
||||
|]
|
||||
@@ -331,7 +331,8 @@ CREATE TABLE test_chat_schema.contact_profiles (
|
||||
incognito smallint,
|
||||
local_alias text DEFAULT ''::text NOT NULL,
|
||||
preferences text,
|
||||
contact_link bytea
|
||||
contact_link bytea,
|
||||
short_descr text
|
||||
);
|
||||
|
||||
|
||||
@@ -577,7 +578,8 @@ CREATE TABLE test_chat_schema.group_profiles (
|
||||
user_id bigint,
|
||||
preferences text,
|
||||
description text,
|
||||
member_admission text
|
||||
member_admission text,
|
||||
short_descr text
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user