Notification hot fixes (#3276)

Signed-off-by: Denis Bykhov <bykhov.denis@gmail.com>
This commit is contained in:
Denis Bykhov 2023-05-29 15:26:36 +06:00 committed by GitHub
parent 24f3c161d4
commit eae0107d28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 4 deletions

View File

@ -456,7 +456,7 @@ export function createModel (builder: Builder, options = { addApplication: true
icon: chunter.icon.Chunter,
txClass: core.class.TxCreateDoc,
component: chunter.activity.TxCommentCreate,
// label: chunter.string.LeftComment,
label: chunter.string.LeftComment,
display: 'content',
editable: true,
hideOnRemove: true

View File

@ -53,11 +53,11 @@
function getFiltered (docs: DocUpdates[], filter: 'all' | 'read' | 'unread'): void {
if (filter === 'read') {
filtered = docs.filter((p) => !p.txes.some((p) => p.isNew))
filtered = docs.filter((p) => !p.txes.some((p) => p.isNew) && p.txes.length > 0)
} else if (filter === 'unread') {
filtered = docs.filter((p) => p.txes.some((p) => p.isNew))
filtered = docs.filter((p) => p.txes.some((p) => p.isNew) && p.txes.length > 0)
} else {
filtered = docs
filtered = docs.filter((p) => p.txes.length > 0)
}
listProvider.update(filtered)
if (loading || _id === undefined) {

View File

@ -45,6 +45,7 @@
(res) => {
docs = []
for (const doc of res) {
if (doc.txes.length === 0) continue
const txes = doc.txes.filter((p) => p.modifiedBy === accountId)
if (txes.length > 0) {
docs.push({

View File

@ -55,6 +55,7 @@
function getFiltered (docs: DocUpdates[], filter: 'all' | 'read' | 'unread'): void {
const filtered: DocUpdates[] = []
for (const doc of docs) {
if (doc.txes.length === 0) continue
if (filter === 'read') {
const txes = doc.txes.filter((p) => !p.isNew)
if (txes.length > 0) {