Slide icon indicating copy to clipboard operation
Slide copied to clipboard

/r/random sidebar is from a different random sub than the one displayed

Open Alexendoo opened this issue 10 years ago • 13 comments

Slide version: 70a60a0186e13709e5da2b8bc58f550dc14a13cf Android version: 5.1.1

Edit: So the same would also be true for randnsfw

Alexendoo avatar Mar 09 '16 12:03 Alexendoo

The problem is this: The string value is "random" and thus the app asks reddit for the sidebar to "random" sub and that's why it is different.

So that same issue happens here when you ask for a different sort. Fix by simply getting the subreddit name from the posts on the onCreate method.

So doing subreddit = ((SubmissionsView) adapter.getCurrentFragment()).posts.subreddit; Unless that also takes it from that first variable. Then it should be something like: subreddit = ((SubmissionsView) adapter.getCurrentFragment()).posts.posts.get(0).getSubredditName(); Before calling doSubSidebar(subreddit); Should work

Should be preserved somewhere though (maybe a flag). because I think refreshing should change the subreddit if it was random.

dethstar avatar Apr 19 '16 01:04 dethstar

I don't think your code snippet will work for subreddits with 0 posts, correct?

Controless avatar Apr 19 '16 02:04 Controless

I think the first snippet should, because it access the posts object that has a posts list. The second one would def throw an exception for a subreddit with 0 posts.

dethstar avatar Apr 19 '16 02:04 dethstar

In addition to this, when submitting to /r/random, the 'Subreddit' edittext should be autofilled with the current random subreddit name (instead of 'random'/'randnsfw').

Controless avatar May 05 '16 22:05 Controless

Fixed now!

ccrama avatar May 26 '16 22:05 ccrama

I think this issue should be reopened, it seems like you fixed it for /r/random but not /r/randnsfw. The sidebar/subreddit edittext both display different subreddit info than the actual subreddit. So to clarify, if the randnsfw subreddit is X, the sidebar and subreddit edittext both display a subreddit Y (the same, yet different sub).

Controless avatar May 27 '16 03:05 Controless

Is randnsfw a thing? Haven't heard of that before

ccrama avatar May 27 '16 03:05 ccrama

Yes, it basically opens up a random nsfw subreddit.

Controless avatar May 27 '16 04:05 Controless

There's also /r/myrandom

Alexendoo avatar May 27 '16 14:05 Alexendoo

Added nsfwrandom and myrandom

ccrama avatar May 31 '16 15:05 ccrama

Looks like this issue reappeared at some point.

Slide version: 6.2 (F-Droid) Android version: Q Beta 5

dpeukert avatar Jul 28 '19 20:07 dpeukert

For which sub @dpeukert - e.g. random, nsfwrand, myrandom?

Alexendoo avatar Jul 29 '19 14:07 Alexendoo

I was able to reproduce this with random and nsfwrand (myrandom seems to be a Reddit Premium only feature).

On Mon, 29 Jul 2019, 16:26 Alex Macleod, [email protected] wrote:

For which sub @dpeukert https://github.com/dpeukert - e.g. random, nsfwrand, myrandom?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ccrama/Slide/issues/1165?email_source=notifications&email_token=AA2KYAANRV77IB26IAEVEE3QB34ZDA5CNFSM4B5SYXQ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3A4CUQ#issuecomment-516014418, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2KYACPYR3CKX435U7Y443QB34ZDANCNFSM4B5SYXQQ .

dpeukert avatar Jul 29 '19 14:07 dpeukert