themotte / rDrama

This code runs https://www.themotte.org. Forked from https://github.com/Aevann1/rDrama
GNU Affero General Public License v3.0
25 stars 31 forks source link

fixes the pin button showing when it shouldn't be #620

Open justcool393 opened 1 year ago

justcool393 commented 1 year ago

specifically when Comment.sticky_api_url returns None. None is not "", so it shows the button, albeit with a bad url

justcool393 commented 1 year ago

The proposed change to the desktop template works as intended!

See files/templates/component/comment/actions_mobile_admin.html, though, which probably needs a similar conditional (and conversion to use Comment.sticky_api_url).

horrifyingly, it seems like they're split across two files, so not sure how to best rectify that (actions_mobile_admin.html and actions_mobile.html)

justcool393 commented 1 year ago

The proposed change to the desktop template works as intended!

See files/templates/component/comment/actions_mobile_admin.html, though, which probably needs a similar conditional (and conversion to use Comment.sticky_api_url).

reviewed and changed. we test for sticky_api_url here. because they're in different modals, it's hard to unify them, but we can at least do a test.

zorbathut commented 1 year ago

Whoops, this ended up with conflicts. Sorry, lotta stuff going through lately >_<