accumulator / Quickddit

Reddit client for Jolla's SailfishOS, Ubuntu Touch and Nokia N9
GNU General Public License v3.0
53 stars 21 forks source link

Posting links doesn't work #54

Closed szopin closed 4 years ago

szopin commented 4 years ago

Only selfposts allow submitting

szopin commented 4 years ago

Not sure why this got closed, mobile view issue maybe

accumulator commented 4 years ago

Thanks for noticing this! It's a regression that appears on subreddits that have no flairs.

Your patch however could be even shorter. The check for subredditsFlair.length should I think be totally removed, and the check for linkTitle.text.length is already satisfied one line above.

Could you change the line to

&& ((selfLinkSwitch.checked && linkDescription.text.length > 0) || (!selfLinkSwitch.checked && linkUrl.acceptableInput))

szopin commented 4 years ago

Updated, didn't want to touch the flair part as still never seen this feature in action, so no idea how that works, for normal subreddits checked and the submit button does light up now as expected, thanks!

accumulator commented 4 years ago

Merged, thanks.

Flair is a bit complex, there are subreddits that allow you to choose from a list (which is implemented in Quickddit) and there are subreddits where you can enter custom flair text (not implemented). The flair part in the button enable check was to allow choosing a new flair and submit, but that broke the button for subreddits without a flair list. So, corner case but good find!