Repository navigation
Status feature - #2505
Status feature#2505
Conversation
er-vin
left a comment
There was a problem hiding this comment.
"Obviously" UserStatus looks like a good target for tests. Needs stubbing the server part somehow, I think we got something which might help there. We got that unused mockserver thing... maybe needs to be revived a bit.
6a5803e to
00605bb
Compare
00605bb to
d56655b
Compare
d56655b to
fc62de2
Compare
|
@camilasan feel free to post screenshots if you need more design feedback. :) |
4b8cd69 to
a89f27f
Compare
684a574 to
934d6a7
Compare
934d6a7 to
fb08b5d
Compare
|
@camilasan Any chance you can fix those clang-tidy errors? |
aa920ef to
0b4b8e0
Compare
4344b41 to
6134e2b
Compare
|
@camilasan I guess, those clang-tidy issues need to be addressed too :) |
20cde38 to
9adaafe
Compare
|
@camilasan @er-vin @FlexW Maybe we should add tests after this PR is merged? |
7b73840 to
34ff16d
Compare
- AccountState controls UserStatus. - Display user status in the system tray menu next to user's avatar. Signed-off-by: Camila <[email protected]>
- This information is retrieved from the notifications endpoint. - Add icons for the different pre defined status. - Make functions available to QML to decide which status icon to display. - Display the user status icon on the avatar and move the online/offline connection status to the folder icon. Signed-off-by: Camila <[email protected]>
- User QHash to map status strings and Status enum. Signed-off-by: Camila <[email protected]>
Signed-off-by: Camila <[email protected]>
34ff16d to
9219926
Compare
|
AppImage file: Nextcloud-PR-2505-9219926a74b954b5915f2a9e4e3900604aca577b-x86_64.AppImage |
| } | ||
|
|
||
| void User::slotRefreshUserStatus() { | ||
| // TODO: check for _account->account()->capabilities().userStatus() |
| * @brief desktopNotificationStatusReceived - signal to report if notifications are allowed | ||
| * @param status - set desktop notifications allowed status | ||
| */ | ||
| void allowDesktopNotificationsChanged(const bool isAllowed); |
There was a problem hiding this comment.
This strikes me as strange design wise that this sits on the very general JsonApiJob... I'd have expected the corresponding header to be checked in UserStatus (IIRC you should have access to the reply there).
|
@er-vin I always wondered about this, if it makes sense to make primitive
(base) types `const`. In theory, you could modify `isAllowed` in the
function if it is not const so there would be some benefit if one makes
them `const`.
Yes, this would avoid this potential mistake on the implementation side.
The downside I see is that you leak an implementation detail ("I shall not
modify this parameter internally") through the API of the class, which means
that once that implementation changes you might need to modify the header and
get every other type depending on this class to be rebuilt.
As far as API is concerned, there's also the consistency argument: it's
extremely rarely done, so it's more noise for little gain. Since I generally
consider APIs to be most important (long story, for another time), that
explains my bias. ;-)
Another thing to take into consideration for libraries is: would that change
(const to non const) be binary compatible? I think it would be on most
platforms but I'd have to check, typically I always have doubts regarding MSVC
for this kind of things. Granted this doesn't quite apply to this project. :-)
|
Fix part of #2318:
Do not disturb:

Online:

Online with no message:

Away:

Invisible:

Offline (no status set):

Connected:

Disconnected:
