Moderation button doesn't appear if entered thread from widget
Slide version: https://github.com/ccrama/Slide/commit/39999037c2bcd637e2c7333607cfd545d55b29da Android version: 6.0.1 July patch
This is because it isn't saved wheter a user is mod or not; we should save that though, as it doesn't change very often.
This could be also used to display the moderation button in navbar, right now it loads it on startup and I frequently end up tapping something else.
Yep, this would solve that as well. I remember that @Alexendoo and I talked about that looong ago.
Has this been fixed if not I'd be interested in tackling it.
Pretty sure it hasn't been fixed. The issue here is that it isn't stored after a close whether a user is mod (and which subreddits he mods).
Thanks for your help, that would be great!
Wouldn't it just be about checking if the user mods the subreddit on the onCreate method within the view opened by the Widget?
The issue is that would happen after the views are displayed, which would defeat the purpose, unless we force reload the view. A more permanent solution would be saving a list of users' moderated subreddits and populating the list after authentication and before any data is shown. Would require no connection, and could be updated upon the MainActivity method that checks for moderated subs
Indeed. Your approach would probably fix this, but the underlying issue is visible in other places as well, and it would be really great if it's finally fixed.
Just implemented it, now it caches the modOf array for future use (and re-writes it on every authentication to keep it up to date)