Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F116596
matrix-room-timeline.cpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
matrix-room-timeline.cpp
View Options
/*
* This file is part of kazv.
* SPDX-FileCopyrightText: 2020 Tusooa Zhu <tusooa@kazv.moe>
* SPDX-License-Identifier: AGPL-3.0-or-later
*/
#include
<libkazv-config.hpp>
#include
<immer/config.hpp>
// https://github.com/arximboldi/immer/issues/168
#include
<lager/lenses/optional.hpp>
#include
<cursorutil.hpp>
#include
"matrix-room-timeline.hpp"
#include
"matrix-event.hpp"
#include
"helper.hpp"
MatrixRoomTimeline
::
MatrixRoomTimeline
(
Kazv
::
Room
room
,
QObject
*
parent
)
:
QObject
(
parent
)
,
m_room
(
room
)
,
m_timeline
(
m_room
.
timelineEvents
())
,
LAGER_QT
(
count
)(
m_timeline
.
xform
(
containerSize
))
,
LAGER_QT
(
eventIds
)(
m_timeline
.
xform
(
zug
::
map
(
[](
auto
container
)
{
return
zug
::
into
(
QStringList
{},
zug
::
map
([](
Kazv
::
Event
event
)
{
return
QString
::
fromStdString
(
event
.
id
());
}),
std
::
move
(
container
));
})))
{
}
MatrixRoomTimeline
::~
MatrixRoomTimeline
()
=
default
;
MatrixEvent
*
MatrixRoomTimeline::at
(
int
index
)
const
{
return
new
MatrixEvent
(
m_timeline
[
index
][
lager
::
lenses
::
or_default
]);
}
File Metadata
Details
Attached
Mime Type
text/x-c
Expires
Sun, Dec 1, 9:14 PM (1 d, 18 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
41847
Default Alt Text
matrix-room-timeline.cpp (1 KB)
Attached To
Mode
rK kazv
Attached
Detach File
Event Timeline
Log In to Comment