Skip to content
This repository has been archived by the owner on Jun 1, 2024. It is now read-only.

[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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant