Repository navigation
Set user status - #3639
Set user status#3639
Conversation
874f7cf to
d5675a9
Compare
|
Very cool! As usual, mostly detail feedback on design:
In the dialog:
|
127d2ad to
cbad873
Compare
|
@jancborchardt Does that work? Align the button text/icon to the left is not easily possible in Qml. We would need to design our own button. I would prefer to avoid that now because it is too much work for the added value. |
cbafdf3 to
2dd8012
Compare
2dd8012 to
c00bbda
Compare
|
@FlexW very nice! :) I converted the feedback above into checkboxes, can you check off if that’s done? And the dialog could use a little bit more vertical whitespace between the logical sections and on the top, like so: |
c00bbda to
87677a8
Compare
|
@jancborchardt done |
87677a8 to
33874b3
Compare
be0d4d9 to
ccb1665
Compare
mgallien
left a comment
There was a problem hiding this comment.
expect more review rounds after this one
|
|
||
| SetUserStatusDialogModel::SetUserStatusDialogModel(QObject *parent) | ||
| : QObject(parent) | ||
| , _dateTimeProvider(new DateTimeProvider) |
There was a problem hiding this comment.
use std::make_unique<DateTimeProvider>()
There was a problem hiding this comment.
the object dynamically allocated by std::make_unique<DateTimeProvider>() is already managed by an instance of std::unique_ptr so it can never leak
direct usage of new can lead to a leak if there is something happening like an exception being fired between the call to new and the call to the constructor of the std::unique_ptr
There was a problem hiding this comment.
Not sure because that is the implementation of std::make_unique() in my stl:
/// std::make_unique for single objects
template<typename _Tp, typename... _Args>
inline typename _MakeUniq<_Tp>::__single_object
make_unique(_Args&&... __args)
{ return unique_ptr<_Tp>(new _Tp(std::forward<_Args>(__args)...)); }Seems to be just that what I do.
| , _userStatusJob(std::move(userStatusJob)) | ||
| , _userStatus("no-id", "", "😀", | ||
| UserStatus::OnlineStatus::Online, false, {}) | ||
| , _dateTimeProvider(new DateTimeProvider) |
There was a problem hiding this comment.
use std::make_unique<DateTimeProvider>()
|
|
||
| Q_LOGGING_CATEGORY(lcUserStatusDialogModel, "nextcloud.gui.userstatusdialogmodel", QtInfoMsg) | ||
|
|
||
| SetUserStatusDialogModel::SetUserStatusDialogModel(QObject *parent) |
There was a problem hiding this comment.
this will leave the object in a working state or an invalid one ?
There was a problem hiding this comment.
Invalid. But it's needed to make it available for Qml.
|
@FlexW Left a few comments. Some of them could be outdated as I have been reviewing it commit-by-commit. Feel free to ignore those. The functionality seems to be working. Tested locally. |
db5f453 to
0794266
Compare
0794266 to
aa7f148
Compare
ade8341 to
aebea6b
Compare
|
/rebase |
55e094b to
c6e961f
Compare
allexzander
left a comment
There was a problem hiding this comment.
Other than emoji not being displayed in the button and minor issues, I think it is good to go as version 1.
Signed-off-by: Felix Weilbach <[email protected]>
c1d6e77 to
8a8d488
Compare
|
AppImage file: Nextcloud-PR-3639-8a8d488454405356b5d11f63bebff2d69be43b02-x86_64.AppImage |



Fixes a part of #2318
Related #3045
Set the user status from the main dialog:

A dialog to set a custom user status:

Emoji picker:

Note to myself: Upgrade to Qt 5.15 before this can be merged.