2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-09-01 06:55:58 +00:00

Remove history_item and layout from pch.

Also move some code to separate modules.
Also create history item views by Window::Controller.
This commit is contained in:
John Preston
2018-01-11 22:33:26 +03:00
parent 4740d44159
commit bee474f6e9
78 changed files with 794 additions and 525 deletions

View File

@@ -18,6 +18,7 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
#include "boxes/confirm_box.h"
#include "media/media_audio.h"
#include "storage/localstorage.h"
#include "history/view/history_view_cursor_state.h"
QString formatSizeText(qint64 size) {
if (size >= 1024 * 1024) { // more than 1 mb
@@ -221,3 +222,15 @@ msp mst paf pif ps1 reg rgs sct shb shs u3p vb vbe vbs vbscript ws wsf\
auto lastDotIndex = filename.lastIndexOf('.');
return (lastDotIndex >= 0) && (executableTypes->indexOf(filename.mid(lastDotIndex + 1).toLower()) >= 0);
}
[[nodiscard]] HistoryTextState LayoutItemBase::getState(
QPoint point,
HistoryStateRequest request) const {
return {};
}
[[nodiscard]] TextSelection LayoutItemBase::adjustSelection(
TextSelection selection,
TextSelectType type) const {
return selection;
}