Kuroba icon indicating copy to clipboard operation
Kuroba copied to clipboard

[Feature Request] Screenshotting posts

Open ghost opened this issue 5 years ago • 11 comments

Dashchan has an option to select and screenshot posts. Would be nice to have that here too so that if you want to screencap a post and a reply with a lot of replies in between, you don't have to take a super long screenshot.

Dashchan example

ghost avatar Feb 01 '20 09:02 ghost

It would basically be a copy/paste of this code here: https://github.com/Mishiranu/Dashchan/blob/de24d7f967bd044f823d8b68b89e6f81d166a1f3/src/com/mishiranu/dashchan/ui/navigator/manager/ThreadshotPerformer.java

Adamantcheese avatar Feb 01 '20 09:02 Adamantcheese

@Adamantcheese Let's not copy dashchan's code. We can do better than that. And I don't mean that copying code is bad (it's open source who cares) but that dashchan's code is fucking gross. Seeing this code, I'm starting to remember Telegram's code (they are kinda similar in their abomination), but Telegram definitely takes the cake.

K1rakishou avatar Feb 01 '20 17:02 K1rakishou

The concept behind it would be exactly the same, in a loop get a View for a PostCell, measure it, add it to a running total, make a bitmap and draw each View to it, then save the bitmap.

Adamantcheese avatar Feb 01 '20 21:02 Adamantcheese

Well, yes. Bonus points are for not holding the whole bitmap in memory.

K1rakishou avatar Feb 01 '20 21:02 K1rakishou

Just another though. We should make the post selection feature more generic, because it's a kinda cool thing to have and we may end up using it for something else in the future. I think it should work with both threads/posts (i.e. in the catalog and in a thread) and with every kind of PostCell. We could even split this task in two.

K1rakishou avatar Feb 03 '20 09:02 K1rakishou

Yeah uh, no, that's stupid. The only other post cell types are stubs and catalog cells, which aren't interesting at all, and you can just use the OP in the actual thread view. If you want, you can add in special collage stuff for images vs whole cells, but don't make this a goddamn framework. If you submit something massive again, I'm probably just going to outright reject it for feature creep.

Adamantcheese avatar Feb 04 '20 03:02 Adamantcheese

Alright, but what about making the post selection more flexible to changes? There won't even have to be much work done with other cells - just add a view on top of every one of them to handle the clicks and check whether the "isInSelectionMode" flag is true (which is going to be in some kind of manager/controller). I just don't want to make it rigid, meaning, "it exists only for this one feature and if ever need it for something else you will have to rewrite half of the code." That's what I'm suggesting.

K1rakishou avatar Feb 04 '20 08:02 K1rakishou

So you want to do... exactly what Dashchan does.

Adamantcheese avatar Feb 05 '20 02:02 Adamantcheese

Well, maybe, but the point is to not copy dashchan's code. Or even to not look at it and do it by ourselves.

K1rakishou avatar Feb 05 '20 07:02 K1rakishou

You don't get the point of open source do you. Get your head out of your ass.

Adamantcheese avatar Feb 05 '20 07:02 Adamantcheese

I do, but it's just that dashchan's code is really not great. Well, whatever. Maybe I just misunterstood what you meant here - "It would basically be a copy/paste of this code here".

K1rakishou avatar Feb 05 '20 07:02 K1rakishou