Bug 466515 - Neochat does not respect global room notification settings
Summary: Neochat does not respect global room notification settings
Status: RESOLVED FIXED
Alias: None
Product: NeoChat
Classification: Applications
Component: General (show other bugs)
Version: 23.01.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Tobias Fella
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-02-27 10:25 UTC by Gergely HORVÁTH
Modified: 2023-05-10 16:23 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gergely HORVÁTH 2023-02-27 10:25:13 UTC
Hello,

I realized that neochat does not respect the notification state of rooms. My setting for DM is to notify about everything, while for rooms it is set to mentions and keywords. Although room notifications are set to Follow global settings, the unread message counter is presented next to their names. What I expect is to only see a dot next to the room name. Grey numbers or green numbers (if there was a mention or keyword in the chat) seems to be working as expected. These global and room settings produce the expected behaviour under nheko desktop, element desktop and fluffychat android.

If you need more information, I gladly provide it.

Best regards,
Gergely

```sh
(0) horvathg@omnia : ~ (0) >> pacman -Qs neochat
local/neochat 23.01.0-1
    A client for matrix, the decentralized communication protocol
```

Operating System: Arch Linux
KDE Plasma Version: 5.26.5
KDE Frameworks Version: 5.103.0
Qt Version: 5.15.8
Kernel Version: 6.1.11-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × 11th Gen Intel® Core™ i7-11370H @ 3.30GHz
Memory: 15,4 GiB of RAM
Graphics Processor: Mesa Intel® Xe Graphics
Manufacturer: TUXEDO
Product Name: TUXEDO InfinityBook Pro 14 Gen6
Comment 1 James Graham 2023-02-27 18:06:00 UTC
This one is more complicated than it should be. The number bubbles in the room list are not actually related to push notifications which the settings you talk about control. Instead they are just a count of the number of messages between your read marker and the end of the timeline.

This means in practise there is no relation between notification rules and the unread numbers and I'm inclined to keep it that way.

Note: Neochat used to and other clients still have the linkage because at one point they were trying to relate the two but they gave up because it was too hard. See https://github.com/matrix-org/matrix-spec-proposals/pull/2625 for the attempt and https://github.com/matrix-org/matrix-spec-proposals/blob/babolivier/unread_counts/proposals/2654-unread-counts.md for what is likely to be the accepted behaviour in the future.
Comment 2 Gergely HORVÁTH 2023-02-28 09:11:24 UTC
I think I understand the difference and accept your design choice. Thank you for explaining!

However this raises another question: sometimes I still see some rooms marked with only a single dot, no big unread marker. What do they mean? I'm not even sure, if those rooms are unread or has some lower priority events (like an emote reaction). Can you clarify the usage/meaning of the dot?
Comment 3 James Graham 2023-02-28 16:27:15 UTC
Yes looking at the code the relevant qml component looks at two different values, one of which is deprecated and it looks like these can give different results we should definitely fix this.
Comment 4 Bug Janitor Service 2023-05-09 16:31:00 UTC
A possibly relevant merge request was started @ https://invent.kde.org/network/neochat/-/merge_requests/984
Comment 5 James Graham 2023-05-10 16:23:19 UTC
Git commit b362365609579554d4cedd62dff287efc9270163 by James Graham.
Committed on 10/05/2023 at 16:23.
Pushed by nvrwhere into branch 'master'.

Remove Unread Count

Unread count is deprecated and notification count should be used in all cases. As such remove unreadCount and use notification count in all places it was being used.

Fixes network/neochat#76 \

M  +1    -5    src/models/roomlistmodel.cpp
M  +0    -1    src/models/roomlistmodel.h
M  +5    -6    src/qml/Page/RoomList/RoomDelegate.qml

https://invent.kde.org/network/neochat/commit/b362365609579554d4cedd62dff287efc9270163