From 49125be768734bd95e6a379ae6e821ef3b51002f Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Thu, 20 Aug 2020 16:13:32 +0200 Subject: [PATCH] Fix error when favoriting a conversation in the rightsidebar Signed-off-by: Joas Schilling --- src/components/RightSidebar/RightSidebar.vue | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/src/components/RightSidebar/RightSidebar.vue b/src/components/RightSidebar/RightSidebar.vue index 6d694bdcb3..0d31982c1b 100644 --- a/src/components/RightSidebar/RightSidebar.vue +++ b/src/components/RightSidebar/RightSidebar.vue @@ -86,11 +86,7 @@ import { CollectionList } from 'nextcloud-vue-collections' import BrowserStorage from '../../services/BrowserStorage' import { CONVERSATION, WEBINAR, PARTICIPANT } from '../../constants' import ParticipantsTab from './Participants/ParticipantsTab' -import { - addToFavorites, - removeFromFavorites, - setConversationName, -} from '../../services/conversationsService' +import { setConversationName } from '../../services/conversationsService' import isInLobby from '../../mixins/isInLobby' import SetGuestUsername from '../SetGuestUsername' @@ -217,13 +213,7 @@ export default { }, async onFavoriteChange() { - if (this.conversation.isFavorite) { - await removeFromFavorites(this.conversation.token) - } else { - await addToFavorites(this.conversation.token) - } - - this.conversation.isFavorite = !this.conversation.isFavorite + this.$store.dispatch('toggleFavorite', this.conversation) }, handleUpdateActive(active) {