@thor
Then you just add a row whenever you hit a square number, but you'll need to have an exception for 3 attachments if you want to keep Mastodon's default behavior.

Follow

@thor
After that, you check if the number of attachments is dividable by the row number:
if it is, then you'll equally split the attachments between the rows, you divide number_attachments/number_rows to get how many;
if it isn't, then you have one row that has rounded_down(number_attachments/number_rows), and the rest are rounded_up(number_attachments/number_rows).

· · Web · 0 · 0 · 0
Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.