summary refs log tree commit diff
path: root/include/Utils.h
diff options
context:
space:
mode:
authorKonstantinos Sideris <sideris.konstantin@gmail.com>2018-01-05 00:27:32 +0200
committerKonstantinos Sideris <sideris.konstantin@gmail.com>2018-01-05 00:27:32 +0200
commit983aea7c76da65214463e725576e8b147fd02cdf (patch)
treeed652a099c5a7cce7d9cde091c14b72295ac879d /include/Utils.h
parentRemove an extra colon from the receipt time (diff)
downloadnheko-983aea7c76da65214463e725576e8b147fd02cdf.tar.xz
Create widgets on demand for messages added to the end of the timeline
Diffstat (limited to 'include/Utils.h')
-rw-r--r--include/Utils.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/include/Utils.h b/include/Utils.h
new file mode 100644

index 00000000..183ebbbe --- /dev/null +++ b/include/Utils.h
@@ -0,0 +1,20 @@ +#pragma once + +#include "RoomInfoListItem.h" + +#include <QDateTime> +#include <mtx/events/collections.hpp> + +namespace utils { + +using TimelineEvent = mtx::events::collections::TimelineEvents; + +//! Human friendly timestamp representation. +QString +descriptiveTime(const QDateTime &then); + +//! Generate a message description from the event to be displayed +//! in the RoomList. +DescInfo +getMessageDescription(const TimelineEvent &event, const QString &localUser); +}