Slide icon indicating copy to clipboard operation
Slide copied to clipboard

Moderation button doesn't appear if entered thread from widget

Open Soberat opened this issue 10 years ago • 9 comments

Slide version: https://github.com/ccrama/Slide/commit/39999037c2bcd637e2c7333607cfd545d55b29da Android version: 6.0.1 July patch

Soberat avatar Aug 11 '16 14:08 Soberat

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.

l3d00m avatar Aug 12 '16 14:08 l3d00m

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.

Soberat avatar Aug 12 '16 14:08 Soberat

Yep, this would solve that as well. I remember that @Alexendoo and I talked about that looong ago.

l3d00m avatar Aug 12 '16 19:08 l3d00m

Has this been fixed if not I'd be interested in tackling it.

dethstar avatar Sep 03 '16 16:09 dethstar

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!

l3d00m avatar Sep 03 '16 17:09 l3d00m

Wouldn't it just be about checking if the user mods the subreddit on the onCreate method within the view opened by the Widget?

dethstar avatar Sep 03 '16 17:09 dethstar

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

ccrama avatar Sep 03 '16 17:09 ccrama

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.

l3d00m avatar Sep 03 '16 17:09 l3d00m

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)

ccrama avatar Sep 12 '16 18:09 ccrama