Skip to content
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

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Conversation

wofferl
Copy link
Contributor

@wofferl wofferl commented Oct 3, 2024

Summary

Things that are still missing here:

  • mark as read on scroll feature is not yet implemented
  • import/export feeds and articles

Checklist

@wofferl wofferl marked this pull request as draft October 5, 2024 13:50
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]>
@wofferl wofferl marked this pull request as ready for review October 5, 2024 15:18
lib/Listeners/UserSettingsListener.php Outdated Show resolved Hide resolved
Comment on lines +103 to +117
$usersettings = [
'compact',
'compactExpand',
'preventReadOnScroll',
'oldestFirst',
'showAll'
];
foreach ($usersettings as $setting) {
$this->initialState->provideInitialState($setting, $this->settings->getUserValue(
$this->getUserId(),
$this->appName,
$setting,
'0')
);
}
Copy link
Contributor

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.

Copy link
Contributor Author

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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants