remove unused function and set position to center of timeline view

This commit is contained in:
targetakhil 2021-04-15 22:32:37 +05:30
parent dff5cfc3ba
commit 9934004702
3 changed files with 7 additions and 15 deletions

View File

@ -9,11 +9,12 @@ import im.nheko 1.0
Popup {
id: forwardMessagePopup
x: Math.round(parent.width / 2 - width / 2)
y: Math.round(parent.height / 2 - height / 2)
modal: true
palette: colors
parent: Overlay.overlay
modal: true
x: 400
y: 200
width: implicitWidth >= 300 ? implicitWidth : 300
height: implicitHeight + completerPopup.height + padding * 2
@ -37,10 +38,12 @@ Popup {
Column {
id: forwardColumn
spacing: 5
Label {
id: titleLabel
text: qsTr("Forward Message")
font.bold: true
bottomPadding: 10
@ -48,6 +51,7 @@ Popup {
Reply {
id: replyPreview
modelData: TimelineManager.timeline ? TimelineManager.timeline.getDump(mid, "") : {
}
userColor: TimelineManager.userColor(modelData.userId, colors.window)

View File

@ -832,17 +832,6 @@ TimelineModel::forwardMessage(QString eventId, QString roomId)
emit forwardToRoom(e, roomId, cache::isRoomEncrypted(room_id_.toStdString()));
}
QString
TimelineModel::messageContent(QString eventId)
{
auto e = events.get(eventId.toStdString(), "");
if (!e)
return "";
auto content = mtx::accessors::body(*e);
return QString::fromStdString(content);
}
void
TimelineModel::viewDecryptedRawMessage(QString id) const
{

View File

@ -220,7 +220,6 @@ public:
Q_INVOKABLE void viewRawMessage(QString id) const;
Q_INVOKABLE void forwardMessage(QString eventId, QString roomId);
Q_INVOKABLE QString messageContent(QString eventId);
Q_INVOKABLE void viewDecryptedRawMessage(QString id) const;
Q_INVOKABLE void openUserProfile(QString userid, bool global = false);
Q_INVOKABLE void openRoomSettings();