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

[Toolbox] TB config isn't loaded if SubredditView is launched directly #3446

Open
timawesomeness opened this issue Feb 4, 2022 · 0 comments

Comments

@timawesomeness
Copy link
Contributor

Originally reported at https://discord.com/channels/407573578985242635/407573579543347202/939125098647015474:

On my android 12 (OneUI 4) phone, I just tried opening the widged that immediately brings me to the r/CrappyDesign subreddit sorted by new by default and waiting 4 minutes, refreshing the subreddit and checking if the removal reasons appear, with no result.

Then, i closed the app and reopened it from the normal icon (not a widget), went to r/CrappyDesign from the list of subreddit in the burger menu (without opening the settings), and they worked!

Investigation: Toolbox configs are only automatically loaded from net/cache if UserSubscriptions.doOnlineSyncing() is run, which only happens if MainActivity is launched, which doesn't happen if something (e.g. a widget) opens a subreddit directly. I totally overlooked that app launch method when implementing TB. Likely also applies to links that directly open a CommentsScreen activity. Simple fix will be to load config before/in evaluating ToolboxUI.canShowRemoval() if it isn't already loaded.

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

No branches or pull requests

1 participant