Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -427,7 +427,6 @@ export default {

// this.$store.dispatch('purgeConversationsStore')
this.$store.dispatch('addConversation', response.data.ocs.data)
this.$store.dispatch('markConversationRead', token)

/**
* Emits a global event that is used in App.vue to update the page title once the
Expand Down
1 change: 0 additions & 1 deletion src/FilesSidebarTabApp.vue
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,6 @@ export default {

const response = await fetchConversation(this.token)
this.$store.dispatch('addConversation', response.data.ocs.data)
this.$store.dispatch('markConversationRead', this.token)
},

/**
Expand Down
1 change: 0 additions & 1 deletion src/PublicShareAuthSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,6 @@ export default {
try {
const response = await fetchConversation(this.token)
this.$store.dispatch('addConversation', response.data.ocs.data)
this.$store.dispatch('markConversationRead', this.token)

// Although the current participant is automatically added to
// the participants store it must be explicitly set in the
Expand Down
1 change: 0 additions & 1 deletion src/PublicShareSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ export default {
try {
const response = await fetchConversation(this.token)
this.$store.dispatch('addConversation', response.data.ocs.data)
this.$store.dispatch('markConversationRead', this.token)

// Although the current participant is automatically added to
// the participants store it must be explicitly set in the
Expand Down
8 changes: 8 additions & 0 deletions src/components/ChatView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
:aria-label="t('spreed', 'Conversation messages')"
:is-chat-scrolled-to-bottom="isChatScrolledToBottom"
:token="token"
:is-visible="isVisible"
@setChatScrolledToBottom="setScrollStatus" />
<NewMessageForm
role="region"
Expand All @@ -70,6 +71,13 @@ export default {
NewMessageForm,
},

props: {
isVisible: {
type: Boolean,
default: true,
},
},

data: function() {
return {
isDraggingOver: false,
Expand Down
9 changes: 9 additions & 0 deletions src/components/LeftSidebar/ConversationsList/Conversation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,11 @@
@click.stop.prevent="copyLinkToConversation">
{{ t('spreed', 'Copy link') }}
</ActionButton>
<ActionButton
:close-after-click="true"
@click.prevent.exact="markConversationAsRead">
{{ t('spreed', 'Mark as read') }}
</ActionButton>

<ActionSeparator />

Expand Down Expand Up @@ -313,6 +318,10 @@ export default {
}
},

markConversationAsRead() {
this.$store.dispatch('clearLastReadMessage', { token: this.item.token })
},

/**
* Deletes the conversation.
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ export default {
}
if (to.name === 'conversation') {
joinConversation(to.params.token)
this.$store.dispatch('markConversationRead', to.params.token)
}
},

Expand Down
3 changes: 0 additions & 3 deletions src/components/LeftSidebar/LeftSidebar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -442,9 +442,6 @@ export default {
this.$store.dispatch('purgeConversationsStore')
conversations.data.ocs.data.forEach(conversation => {
this.$store.dispatch('addConversation', conversation)
if (conversation.token === this.$store.getters.getToken()) {
this.$store.dispatch('markConversationRead', this.$store.getters.getToken())
}
})
/**
* Emits a global event that is used in App.vue to update the page title once the
Expand Down
Loading