2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-09-05 09:05:14 +00:00

Moved History[Media] classes to history_media_types module.

This commit is contained in:
John Preston
2016-09-28 13:15:03 +03:00
parent d277b0d4bb
commit 538ffb9727
33 changed files with 1704 additions and 1340 deletions

View File

@@ -2891,6 +2891,10 @@ TextSelection Text::adjustSelection(TextSelection selection, TextSelectType sele
return { from, to };
}
bool Text::isEmpty() const {
return _blocks.empty() || _blocks[0]->type() == TextBlockTSkip;
}
template <typename AppendPartCallback, typename ClickHandlerStartCallback, typename ClickHandlerFinishCallback, typename FlagsChangeCallback>
void Text::enumerateText(TextSelection selection, AppendPartCallback appendPartCallback, ClickHandlerStartCallback clickHandlerStartCallback, ClickHandlerFinishCallback clickHandlerFinishCallback, FlagsChangeCallback flagsChangeCallback) const {
if (isEmpty() || selection.empty()) {