Skip to content

Commit

Permalink
Merge pull request #69 from Onlineberatung/develop
Browse files Browse the repository at this point in the history
Sync repos
  • Loading branch information
CarlosSoares authored Jul 19, 2022
2 parents 42208b9 + 1d9d39f commit 88b691d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/components/sessionsListItem/SessionListItemComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ import {
hasUserAuthority,
SessionTypeContext,
STATUS_FINISHED,
TenantContext,
TopicSessionInterface,
useConsultingType,
UserDataContext
} from '../../globalState';
Expand Down Expand Up @@ -56,6 +58,7 @@ export const SessionListItemComponent = ({
const { userData } = useContext(UserDataContext);
const { type, path: listPath } = useContext(SessionTypeContext);
const { isE2eeEnabled } = useContext(E2EEContext);
const { tenant } = useContext(TenantContext);

// Is List Item active
const isChatActive =
Expand All @@ -70,6 +73,7 @@ export const SessionListItemComponent = ({
session.item.lastMessageType === ALIAS_MESSAGE_TYPES.MASTER_KEY_LOST
);
const [plainTextLastMessage, setPlainTextLastMessage] = useState(null);
const topicSession = session.item?.topic as TopicSessionInterface;

useEffect(() => {
if (isE2eeEnabled) {
Expand Down Expand Up @@ -297,6 +301,16 @@ export const SessionListItemComponent = ({
: null}
</div>
)}
{topicSession?.id && topicSession.name && (
<div
className="sessionsListItem__topic"
style={{
backgroundColor: tenant?.theming?.primaryColor
}}
>
{topicSession?.name}
</div>
)}
<div className="sessionsListItem__date">
{prettyPrintDate(
session.item.messageDate,
Expand Down

0 comments on commit 88b691d

Please sign in to comment.