mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-09-09 21:44:15 +02:00
Support links in tasks.
This commit is contained in:
parent
b506bf9506
commit
7284926db4
1 changed files with 13 additions and 0 deletions
|
@ -667,11 +667,24 @@ TextState TodoList::textState(QPoint point, StateRequest request) const {
|
||||||
request.forText()));
|
request.forText()));
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
const auto aleft = padding.left()
|
||||||
|
+ st::historyPollAnswerPadding.left();
|
||||||
|
const auto awidth = paintw
|
||||||
|
- st::historyPollAnswerPadding.left()
|
||||||
|
- st::historyPollAnswerPadding.right();
|
||||||
tshift += questionH + st::historyPollSubtitleSkip;
|
tshift += questionH + st::historyPollSubtitleSkip;
|
||||||
tshift += st::msgDateFont->height + st::historyPollAnswersSkip;
|
tshift += st::msgDateFont->height + st::historyPollAnswersSkip;
|
||||||
for (const auto &task : _tasks) {
|
for (const auto &task : _tasks) {
|
||||||
const auto height = countTaskHeight(task, paintw);
|
const auto height = countTaskHeight(task, paintw);
|
||||||
if (point.y() >= tshift && point.y() < tshift + height) {
|
if (point.y() >= tshift && point.y() < tshift + height) {
|
||||||
|
const auto atop = tshift + st::historyPollAnswerPadding.top();
|
||||||
|
auto taskTextResult = task.text.getState(
|
||||||
|
point - QPoint(aleft, atop),
|
||||||
|
awidth,
|
||||||
|
request.forText());
|
||||||
|
if (taskTextResult.link) {
|
||||||
|
return TextState(_parent, taskTextResult);
|
||||||
|
}
|
||||||
_lastLinkPoint = point;
|
_lastLinkPoint = point;
|
||||||
result.link = task.handler;
|
result.link = task.handler;
|
||||||
if (task.completionDate) {
|
if (task.completionDate) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue