From 24cbbbc0b4071a0a4c8cbf289a42d6905056d54f Mon Sep 17 00:00:00 2001 From: AndyLnd Date: Tue, 4 Aug 2020 15:53:50 +0200 Subject: [PATCH] fix: Navigate to conversation url from start ui --- src/script/components/groupList.ts | 5 ++++- src/script/components/list/conversationListCallingCell.ts | 4 ++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/script/components/groupList.ts b/src/script/components/groupList.ts index 5e3bc922f7a..253b2c391b9 100644 --- a/src/script/components/groupList.ts +++ b/src/script/components/groupList.ts @@ -21,6 +21,7 @@ import ko from 'knockout'; import {ParticipantAvatar} from 'Components/participantAvatar'; import type {Conversation} from '../entity/Conversation'; +import {generateConversationUrl} from '../router/routeGenerator'; interface GroupListViewModelParams { click: (group: Conversation) => void; @@ -31,11 +32,13 @@ class GroupListViewModel { groups: ko.ObservableArray; onSelect: (group: Conversation) => void; ParticipantAvatar: typeof ParticipantAvatar; + readonly getConversationUrl: (conversationId: string) => string; constructor(params: GroupListViewModelParams) { this.groups = params.groups; this.onSelect = params.click; this.ParticipantAvatar = ParticipantAvatar; + this.getConversationUrl = generateConversationUrl; } } @@ -43,7 +46,7 @@ class GroupListViewModel { ko.components.register('group-list', { template: `
-
+
diff --git a/src/script/components/list/conversationListCallingCell.ts b/src/script/components/list/conversationListCallingCell.ts index 5f906c1098e..1b6c27b3f48 100644 --- a/src/script/components/list/conversationListCallingCell.ts +++ b/src/script/components/list/conversationListCallingCell.ts @@ -232,8 +232,8 @@ ko.components.register('conversation-list-calling-cell', {
-
- +
+