Slide icon indicating copy to clipboard operation
Slide copied to clipboard

Sort multireddits in "Add /r/x to"

Open Soberat opened this issue 6 years ago • 4 comments

Slide version: https://github.com/ccrama/Slide/commit/e24aaad50a81649feb7e03f049df27c6333ba906 Android version: Pie

Now when you try to add a subreddit to a multi through the sidebar the multis are unsorted. It's a minor thing but an inconvenience nonetheless.

Proposed fix, MainActivity line 2428.


List multiList = new ArrayList(multis.keySet());
                                Collections.sort(multiList);
                                new MaterialDialog.Builder(MainActivity.this).title(
                                        getString(R.string.multi_add_to,
                                                subreddit.getDisplayName()))
                                        .items(multiList)

Soberat avatar Jul 26 '19 18:07 Soberat

Is this a cosmetic issue or a code issue?

Tensounder54 avatar Aug 23 '19 12:08 Tensounder54

Purely cosmetic. Using the list as it is provided (unsorted) makes the multi listing behavior inconsistent.

Soberat avatar Aug 23 '19 13:08 Soberat

Hello, I'm very new to development, but I'd like to work on this issue. Can someone direct me to a starting point for this?

AnglyPascal avatar Jul 03 '22 14:07 AnglyPascal

Around here, with a similar fix as in the original issue post, so you don't want to add just the keySet, you want to add a sorted keySet.

Soberat avatar Jul 03 '22 20:07 Soberat