mirror of
https://github.com/abhinavxd/libredesk.git
synced 2025-11-03 05:23:48 +00:00
Compare commits
2 Commits
v0.3.0-alp
...
v0.3.1-alp
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
71601364ae | ||
|
|
44723fb70d |
@@ -21,7 +21,7 @@ git clone https://github.com/abhinavxd/libredesk.git
|
||||
|
||||
### Running the Dev Environment
|
||||
|
||||
1. Run `make run` to start the libredesk backend dev server on `:9000`.
|
||||
1. Run `make run-backend` to start the libredesk backend dev server on `:9000`.
|
||||
2. Run `make run-frontend` to start the Vue frontend in dev mode using pnpm on `:8000`. Requests are proxied to the backend running on `:9000` check `vite.config.js` for the proxy config.
|
||||
|
||||
---
|
||||
|
||||
@@ -282,8 +282,10 @@ export const useConversationStore = defineStore('conversation', () => {
|
||||
async function fetchMessages (uuid, fetchNextPage = false) {
|
||||
// Messages are already cached?
|
||||
let hasMessages = messages.data.getAllPagesMessages(uuid)
|
||||
if (hasMessages.length > 0 && !fetchNextPage)
|
||||
if (hasMessages.length > 0 && !fetchNextPage) {
|
||||
markConversationAsRead(uuid)
|
||||
return
|
||||
}
|
||||
|
||||
// Fetch messages from server.
|
||||
messages.loading = true
|
||||
@@ -293,7 +295,6 @@ export const useConversationStore = defineStore('conversation', () => {
|
||||
const response = await api.getConversationMessages(uuid, { page: page, page_size: MESSAGE_LIST_PAGE_SIZE })
|
||||
const result = response.data?.data || {}
|
||||
const newMessages = result.results || []
|
||||
// Mark conversation as read
|
||||
markConversationAsRead(uuid)
|
||||
// Cache messages
|
||||
messages.data.addMessages(uuid, newMessages, result.page, result.total_pages)
|
||||
|
||||
Reference in New Issue
Block a user