From e798e9a4177f025dda2b40d109fa40c2ebfd814e Mon Sep 17 00:00:00 2001 From: eugenijm Date: Thu, 29 Oct 2020 13:33:06 +0300 Subject: Optimistic message sending for chat --- test/unit/specs/services/chat_service/chat_service.spec.js | 3 +++ 1 file changed, 3 insertions(+) (limited to 'test/unit/specs') diff --git a/test/unit/specs/services/chat_service/chat_service.spec.js b/test/unit/specs/services/chat_service/chat_service.spec.js index 2eb89a2d..15e64bb5 100644 --- a/test/unit/specs/services/chat_service/chat_service.spec.js +++ b/test/unit/specs/services/chat_service/chat_service.spec.js @@ -2,17 +2,20 @@ import chatService from '../../../../../src/services/chat_service/chat_service.j const message1 = { id: '9wLkdcmQXD21Oy8lEX', + idempotency_key: '1', created_at: (new Date('2020-06-22T18:45:53.000Z')) } const message2 = { id: '9wLkdp6ihaOVdNj8Wu', + idempotency_key: '2', account_id: '9vmRb29zLQReckr5ay', created_at: (new Date('2020-06-22T18:45:56.000Z')) } const message3 = { id: '9wLke9zL4Dy4OZR2RM', + idempotency_key: '3', account_id: '9vmRb29zLQReckr5ay', created_at: (new Date('2020-07-22T18:45:59.000Z')) } -- cgit v1.2.3-70-g09d2 From 757706425a1c865a0e64e9c530b3aa1e7d9e2494 Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Mon, 2 Nov 2020 09:42:09 +0200 Subject: fix test --- test/unit/specs/services/chat_service/chat_service.spec.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/unit/specs') diff --git a/test/unit/specs/services/chat_service/chat_service.spec.js b/test/unit/specs/services/chat_service/chat_service.spec.js index 15e64bb5..0251cae7 100644 --- a/test/unit/specs/services/chat_service/chat_service.spec.js +++ b/test/unit/specs/services/chat_service/chat_service.spec.js @@ -47,10 +47,10 @@ describe('chatService', () => { chatService.resetNewMessageCount(chat) expect(chat.newMessageCount).to.eql(0) + expect(chat.lastSeenMessageId).to.eql(message2.id) - const createdAt = new Date() - createdAt.setSeconds(createdAt.getSeconds() + 10) - chatService.add(chat, { messages: [ { message3, created_at: createdAt } ] }) + // Add message with higher id + chatService.add(chat, { messages: [ message3 ] }) expect(chat.newMessageCount).to.eql(1) }) }) -- cgit v1.2.3-70-g09d2 From 1d2ba946b6b81dc225d0eec21548a737ca2fac5e Mon Sep 17 00:00:00 2001 From: Shpuld Shpuldson Date: Tue, 10 Nov 2020 14:28:10 +0200 Subject: make notifications also use the popup errors, remove all error from status/notif state --- CHANGELOG.md | 4 ++++ src/components/notifications/notifications.vue | 7 ------- src/i18n/en.json | 1 + src/modules/statuses.js | 21 +-------------------- .../notifications_fetcher.service.js | 18 ++++++++++++++---- .../timeline_fetcher/timeline_fetcher.service.js | 3 --- test/unit/specs/components/user_profile.spec.js | 3 +-- 7 files changed, 21 insertions(+), 36 deletions(-) (limited to 'test/unit/specs') diff --git a/CHANGELOG.md b/CHANGELOG.md index 8f14bc59..a6b62bfe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). ### Fixed - Fixed regression in react popup alignment and overflowing - Fixed the occasional bug where screen would scroll 1px when typing into a reply form +- Fixed timeline errors locking timelines + +### Changed +- Errors when fetching are now shown with popup errors instead of "Error fetching updates" in panel headers ## [2.2.0] - 2020-11-06 diff --git a/src/components/notifications/notifications.vue b/src/components/notifications/notifications.vue index bd875cca..b976026e 100644 --- a/src/components/notifications/notifications.vue +++ b/src/components/notifications/notifications.vue @@ -15,13 +15,6 @@ class="badge badge-notification unseen-count" >{{ unseenCount }} -
- {{ $t('timeline.error_fetching') }} -