diff --git a/release-notes.md b/release-notes.md index 6878d184f..b2bf872e4 100644 --- a/release-notes.md +++ b/release-notes.md @@ -5,11 +5,13 @@ All notable changes in this release are listed below. ## [Unreleased] ### New Features + - Test screen for developers is now available [#815](https://github.com/Adamant-im/adamant-im/pull/815) — [@Linhead](https://github.com/Linhead) - Universal macOS build added [#840](https://github.com/Adamant-im/adamant-im/pull/840) — [@S-FrontendDev](https://github.com/S-FrontendDev) - Release notes file added [#853](https://github.com/Adamant-im/adamant-im/pull/853) — [@S-FrontendDev](https://github.com/S-FrontendDev) ### Improvements + - APK name changed in GitHub workflow [#839](https://github.com/Adamant-im/adamant-im/pull/839) — [@S-FrontendDev](https://github.com/S-FrontendDev) - Wallets UI updated for better usability [#846](https://github.com/Adamant-im/adamant-im/pull/846) — [@Linhead](https://github.com/Linhead), [@adamant-al](https://github.com/adamant-al) - ESLint updated to improve code quality [#849](https://github.com/Adamant-im/adamant-im/pull/849) — [@graycraft](https://github.com/graycraft) @@ -19,7 +21,9 @@ All notable changes in this release are listed below. - Updated wallets generating script [#864](https://github.com/Adamant-im/adamant-im/pull/864) — [@Linhead](https://github.com/Linhead) ### Bug Fixes + - Transaction fee calculation for ETH & ERC20 fixed [#805](https://github.com/Adamant-im/adamant-im/pull/805) — [@Linhead](https://github.com/Linhead) - Layout issue on "Export keys" page fixed [#841](https://github.com/Adamant-im/adamant-im/pull/841) — [@kalpovskii](https://github.com/kalpovskii), [@adamant-al](https://github.com/adamant-al) - Add disabled input field in the Welcome to ADAMANT chat, impoved paddings [#842](https://github.com/Adamant-im/adamant-im/pull/842) — [@kalpovskii](https://github.com/kalpovskii) - Resolve source code issues with ESLint 9 [#852](https://github.com/Adamant-im/adamant-im/pull/852) — [@graycraft](https://github.com/graycraft) +- Fix dates in chats not refreshing when day changes while app is in background [#863](https://github.com/Adamant-im/adamant-im/pull/863) — [@Linhead](https://github.com/Linhead) diff --git a/src/components/Chat/Chat.vue b/src/components/Chat/Chat.vue index 5e7aad411..5caa25f79 100644 --- a/src/components/Chat/Chat.vue +++ b/src/components/Chat/Chat.vue @@ -3,6 +3,7 @@ { const maxFileSizeExceeded = files.some(({ file }) => file.size >= UPLOAD_MAX_FILE_SIZE) @@ -561,7 +565,20 @@ onMounted(async () => { isScrolledToBottom.value = chatRef.value.isScrolledToBottom() }) visibilityId.value = Visibility.change((event, state) => { - if (state === 'visible' && isScrolledToBottom.value) markAsRead() + if (state === 'visible') { + const currentDate = new Date().toDateString() + + if (currentDate !== lastVisibleDate.value) { + dateRefreshKey.value = Date.now() + lastVisibleDate.value = currentDate + } + + nextTick(() => { + chatRef.value?.maintainScrollPosition() + }) + + if (isScrolledToBottom.value) markAsRead() + } }) const draftMessage = store.getters['draftMessage/draftReplyTold'](props.partnerId) diff --git a/src/components/Chat/Chats.vue b/src/components/Chat/Chats.vue index 66f562bdd..e0db39202 100644 --- a/src/components/Chat/Chats.vue +++ b/src/components/Chat/Chats.vue @@ -39,6 +39,7 @@