diff --git a/src/app/components/main-chat/single-chat/single-chat.component.scss b/src/app/components/main-chat/single-chat/single-chat.component.scss index 9062300..e2efa03 100644 --- a/src/app/components/main-chat/single-chat/single-chat.component.scss +++ b/src/app/components/main-chat/single-chat/single-chat.component.scss @@ -7,10 +7,8 @@ section { position: relative; &:hover { background-color: #edeefe; - .userContent { - .content { - background-color: #fff; - } + .content { + background-color: #fff; } } } diff --git a/src/app/components/main-chat/single-chat/single-chat.component.ts b/src/app/components/main-chat/single-chat/single-chat.component.ts index e3c8984..d3f575a 100644 --- a/src/app/components/main-chat/single-chat/single-chat.component.ts +++ b/src/app/components/main-chat/single-chat/single-chat.component.ts @@ -120,7 +120,10 @@ export class SingleChatComponent { */ displayLastChatAnswer() { const getChatAnswers = this.chatService.getChatAnswers(this.chat.id); - const lastChatAnswer = getChatAnswers[getChatAnswers.length - 1]; + const sortedAnswers = getChatAnswers.sort((a, b) => { + return a.publishedTimestamp - b.publishedTimestamp; + }); + const lastChatAnswer = sortedAnswers[getChatAnswers.length - 1]; if (lastChatAnswer) { return this.convertTimestampHour(lastChatAnswer.publishedTimestamp); } diff --git a/src/app/service/chat.service.ts b/src/app/service/chat.service.ts index a50b80d..528db3f 100644 --- a/src/app/service/chat.service.ts +++ b/src/app/service/chat.service.ts @@ -37,7 +37,6 @@ export class ChatService implements OnDestroy { this.unsubChatReactions = this.subChatListReactions(); } - /** * Subscribes to the chat list collection in Firestore and updates the local chat list accordingly. * @returns A function to unsubscribe from the chat list. @@ -57,7 +56,6 @@ export class ChatService implements OnDestroy { }); } - /** * Subscribes to the chat answers list collection in Firestore and updates the local chat answers list accordingly. * @returns A function to unsubscribe from the chat answers list. @@ -72,7 +70,6 @@ export class ChatService implements OnDestroy { }); } - /** * Subscribes to the chat reactions list collection in Firestore and updates the local chat reactions list accordingly. * @returns A function to unsubscribe from the chat reactions list. @@ -90,7 +87,6 @@ export class ChatService implements OnDestroy { }); } - /** * Updates the specified chat document with the provided data. * @param chatId The ID of the chat document to update. @@ -105,7 +101,6 @@ export class ChatService implements OnDestroy { }); } - /** * Updates the reaction document with the specified ID with the provided array of user IDs. * @param reactionId The ID of the reaction document to update. @@ -119,7 +114,6 @@ export class ChatService implements OnDestroy { }); } - /** * Creates a new reaction document with the provided data. * @param reaction The reaction data to add to Firestore. @@ -132,7 +126,6 @@ export class ChatService implements OnDestroy { ); } - /** * Deletes a document from the specified Firestore collection. * @param docId The ID of the document to delete. @@ -146,7 +139,6 @@ export class ChatService implements OnDestroy { ); } - /** * Retrieves chat answers associated with the specified chat ID. * @param chatId The ID of the chat to retrieve answers for. @@ -159,7 +151,6 @@ export class ChatService implements OnDestroy { return filteredTasks; } - /** * Toggles the secondary chat window based on the provided chat ID. * @param chatId The ID of the chat to toggle the secondary window for. @@ -180,7 +171,6 @@ export class ChatService implements OnDestroy { } } - /** * Unsubscribes from all Firestore subscriptions when the service is destroyed. */ diff --git a/src/assets/i18n/de.json b/src/assets/i18n/de.json index 9a227e5..d696777 100644 --- a/src/assets/i18n/de.json +++ b/src/assets/i18n/de.json @@ -136,7 +136,7 @@ "add-new-channel": { "header": "Kanal erstellen", - "info": "Kanäle dienen ihrem Team zur Kommunikation. Am besten sollten sie themenbezogen sein #marketing zum Beispiel.", + "info": "Kanäle dienen Ihrem Team zur Kommunikation. Am besten sollten sie themenbezogen sein, wie zum Beispiel der Kanal #marketing.", "header2": "Kanal-Name", "required": "(erforderlich)", "placeholder": "(mind. 6 Buchstaben)", diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index 5ca8abb..fa98a44 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -136,7 +136,7 @@ "add-new-channel": { "header": "Create Channel", - "info": "Channels serve your team for communication. They should be topic-related, e.g., #marketing.", + "info": "Channels serve your team for communication. Ideally, they should be topic-related, such as #marketing.", "header2": "Channel Name", "required": "(required)", "placeholder": "(at least 6 characters)",