-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: add user settings #2795
base: master
Are you sure you want to change the base?
fix: add user settings #2795
Conversation
…oment) Signed-off-by: Wolfgang <[email protected]>
Signed-off-by: Wolfgang <[email protected]>
The backend sends the items to the frontend in packets of 40 sorted by item id. In the unread, all articles or folder view this leads to the fact that new items that have been loaded can also be sorted above the items already displayed. Signed-off-by: Wolfgang <[email protected]>
…sabled Signed-off-by: Wolfgang <[email protected]>
Signed-off-by: Wolfgang <[email protected]>
Signed-off-by: Wolfgang <[email protected]>
Signed-off-by: Wolfgang <[email protected]>
$usersettings = [ | ||
'compact', | ||
'compactExpand', | ||
'preventReadOnScroll', | ||
'oldestFirst', | ||
'showAll' | ||
]; | ||
foreach ($usersettings as $setting) { | ||
$this->initialState->provideInitialState($setting, $this->settings->getUserValue( | ||
$this->getUserId(), | ||
$this->appName, | ||
$setting, | ||
'0') | ||
); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have some link to documentation for this? Based on the function naming this seems like something that should happen once and not for every API call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://docs.nextcloud.com/server/latest/developer_manual/basics/front-end/js.html#loading-initial-state
Unfortunately it is nowhere explained where to put the php part, but looking at other apps like notes, deck. The all have it in the TemplateResponse of the PageController.
Co-authored-by: Sean Molenaar <[email protected]> Signed-off-by: Wolfgang <[email protected]>
Summary
Things that are still missing here:
Checklist