mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
remove unused function and set position to center of timeline view
This commit is contained in:
parent
dff5cfc3ba
commit
9934004702
3 changed files with 7 additions and 15 deletions
|
@ -9,11 +9,12 @@ import im.nheko 1.0
|
||||||
|
|
||||||
Popup {
|
Popup {
|
||||||
id: forwardMessagePopup
|
id: forwardMessagePopup
|
||||||
|
|
||||||
|
x: Math.round(parent.width / 2 - width / 2)
|
||||||
|
y: Math.round(parent.height / 2 - height / 2)
|
||||||
|
modal: true
|
||||||
palette: colors
|
palette: colors
|
||||||
parent: Overlay.overlay
|
parent: Overlay.overlay
|
||||||
modal: true
|
|
||||||
x: 400
|
|
||||||
y: 200
|
|
||||||
|
|
||||||
width: implicitWidth >= 300 ? implicitWidth : 300
|
width: implicitWidth >= 300 ? implicitWidth : 300
|
||||||
height: implicitHeight + completerPopup.height + padding * 2
|
height: implicitHeight + completerPopup.height + padding * 2
|
||||||
|
@ -37,10 +38,12 @@ Popup {
|
||||||
|
|
||||||
Column {
|
Column {
|
||||||
id: forwardColumn
|
id: forwardColumn
|
||||||
|
|
||||||
spacing: 5
|
spacing: 5
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
id: titleLabel
|
id: titleLabel
|
||||||
|
|
||||||
text: qsTr("Forward Message")
|
text: qsTr("Forward Message")
|
||||||
font.bold: true
|
font.bold: true
|
||||||
bottomPadding: 10
|
bottomPadding: 10
|
||||||
|
@ -48,6 +51,7 @@ Popup {
|
||||||
|
|
||||||
Reply {
|
Reply {
|
||||||
id: replyPreview
|
id: replyPreview
|
||||||
|
|
||||||
modelData: TimelineManager.timeline ? TimelineManager.timeline.getDump(mid, "") : {
|
modelData: TimelineManager.timeline ? TimelineManager.timeline.getDump(mid, "") : {
|
||||||
}
|
}
|
||||||
userColor: TimelineManager.userColor(modelData.userId, colors.window)
|
userColor: TimelineManager.userColor(modelData.userId, colors.window)
|
||||||
|
|
|
@ -832,17 +832,6 @@ TimelineModel::forwardMessage(QString eventId, QString roomId)
|
||||||
emit forwardToRoom(e, roomId, cache::isRoomEncrypted(room_id_.toStdString()));
|
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
|
void
|
||||||
TimelineModel::viewDecryptedRawMessage(QString id) const
|
TimelineModel::viewDecryptedRawMessage(QString id) const
|
||||||
{
|
{
|
||||||
|
|
|
@ -220,7 +220,6 @@ public:
|
||||||
|
|
||||||
Q_INVOKABLE void viewRawMessage(QString id) const;
|
Q_INVOKABLE void viewRawMessage(QString id) const;
|
||||||
Q_INVOKABLE void forwardMessage(QString eventId, QString roomId);
|
Q_INVOKABLE void forwardMessage(QString eventId, QString roomId);
|
||||||
Q_INVOKABLE QString messageContent(QString eventId);
|
|
||||||
Q_INVOKABLE void viewDecryptedRawMessage(QString id) const;
|
Q_INVOKABLE void viewDecryptedRawMessage(QString id) const;
|
||||||
Q_INVOKABLE void openUserProfile(QString userid, bool global = false);
|
Q_INVOKABLE void openUserProfile(QString userid, bool global = false);
|
||||||
Q_INVOKABLE void openRoomSettings();
|
Q_INVOKABLE void openRoomSettings();
|
||||||
|
|
Loading…
Reference in a new issue