by recent efforts, all UIs can now display many sticker types as such, even animated ones. it seems to be time to think about how sending stickers can be improved in UI.
in the past, thinking about stickers was mostly around “sticker packs”, their format (own? existing?), how they can be created and identified (hash? changes in packs?) and how they can be distributed (track packs sent to recipients?, send then references?, low-res fallbacks? …)
all in all, many things to solve, so nothing of all that find their way into code.
time for an easier approach. @link2xt posted lately somewhere the idea, to avoid the problem of distribution by simply collecting all stickers one have ever seen and show them in a selector. no sticker packs.
i think, this is a good, pragmatic approach to move forward.
also, that lowers the barriers to create own stickers, eg. we can have an image-option “Use as sticker” and i also like removing the need to create whole packs when one has only one good sticker.
to make that more concrete, a minimal implementation:
UI-wise, we would need a selector, typical Sticker-UIs have lots of tabs here (“Recently used” (showing the ones you sent out) and one for each installed pack). we would need only two tabs (“Recently used” and “All”).
Desktop/Android already have selectors, they are disabled only. iOS would need sth.
API-wise, we would need sth. as
array = dc_get_stickers(context, DC_STICKERS_RECENT|ALL);
there are some implementation details, of course, eg. what about multi-account, delete/add stickers manually, probably more - but not all is needed for a minimal implementation.
core should have a dozen or so predefined stickers, so “All” is never empty on new installations.
as nothing new happens “on the wire” and nothing new is needed for displaying, there is no need that all UI implement things at the same time, so, eg. Android could just start with adding a selector once the API is done.
of course, UI can add more options to the sticker selector, eg. images from well-known folders can be added to other tabs; this is already working that way on desktop. iOS also has a working sticker-sending-alternative by the keyboard in the upcoming version (Memojis).
and, if one day, we decide to support sticker packs somehow in core, we can do that in addition