-
Notifications
You must be signed in to change notification settings - Fork 67
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
Add custom sorting per community/feed #1492
base: develop
Are you sure you want to change the base?
Conversation
Hey I know this is still a draft, but I wanted to leave a quick comment! You may want to consider storing the sorting info in the format thunder/lib/account/models/user_label.dart Lines 106 to 114 in 108605b
This is a super cool feature, by the way!! |
Thanks for the suggestion! I originally made this feature to be account specific (e.g., each account can have it's own set of sort type for the same community/feed). With your suggestion, were you suggesting that the sort type should be consistent across different accounts? (e.g., multiple accounts accessing the same community would get the same sort type) I'm not too sure which method is the best way to go about this, but if you have any thoughts or opinions, please let me know! I'll pull in @K4LCIFER, @kellyaster, and @Fmstrat as well since they're the authors of the original feature requests. |
Yes, that's what I had in mind! But if you think it should be per community per account, that would work too! Another thing we can do is see how other apps handle this feature. |
In my opinion of 1, multiple accounts could be used 2 ways:
In either situation, it's possible a user would want to view new posts in one subscription feed and top in another, so having a unique primary feed sort per qccount would be beneficial. That being said, individual community feeds unique to each account probably won't matter much. Assuming the PR allows for 'make my default community and (other) account views sort by "new"', and 'tailor my all and subscription feeds to sort by "top X"', it will cover most use cases regardless. Edit: To be specific, this is the most varience I think the majority would have:
|
Thanks for the input @Fmstrat! I totally agree that being able to sort the main feed types (All, Local, Subscriptions) per account makes total sense, especially since different accounts are most likely on different instances, with which you would want to interact differently. In your example, it would be ok to have the same sort type for a community across accounts, right? I think that also makes sense to me. For example, the Thunder community doesn't have a ton of activity, so I always like to view it chronologically. I would like to make that change once and have it apply to all of my accounts.
Again, this is also just my opinion as well and I'm hoping others will chime in! |
I think that makes sense, yea. |
Pull Request Description
This is a draft PR which implements the ability to save the sort type per-community/feed. A new database table was created to store the custom sorting, and a new option was added the Settings -> General -> Remember Feed Sort Type.
The precedence of sorting is as follows:
To do this, I had to move the logic of determining the sort type to the FeedBloc. FeedPage no longer has a parameter for the sort type, and the only way to change the sort type for a feed is to call the FeedChangeSortTypeEvent event.
This is still in draft because I want to do some additional testing for the database migrations to ensure it works as expected.
Issue Being Fixed
Issue Number: #1425, #1145, #703
Screenshots / Recordings
Checklist
semanticLabel
s where applicable for accessibility?