mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-21 18:50:47 +03:00
Small qml fixes
This commit is contained in:
parent
fab7805610
commit
78fac7dced
5 changed files with 22 additions and 19 deletions
|
@ -143,11 +143,11 @@ Page {
|
|||
enabled: false
|
||||
height: avatarSize
|
||||
roomid: model.id
|
||||
textColor: model.avatarUrl.startsWith(":/") ? communityItem.unimportantText : communityItem.importantText
|
||||
textColor: model.avatarUrl?.startsWith(":/") == true ? communityItem.unimportantText : communityItem.importantText
|
||||
url: {
|
||||
if (model.avatarUrl.startsWith("mxc://"))
|
||||
if (model.avatarUrl?.startsWith("mxc://") == true)
|
||||
return model.avatarUrl.replace("mxc://", "image://MxcImage/");
|
||||
else if (model.avatarUrl.length > 0)
|
||||
else if ((model.avatarUrl?.length ?? 0) > 0)
|
||||
return model.avatarUrl;
|
||||
else
|
||||
return "";
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
//
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// TODO: using any Qt 6 API version will screw up the reply text color. We need to
|
||||
// figure out a more permanent fix than just importing the old version.
|
||||
//import QtQuick 2.15
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import im.nheko
|
||||
|
|
|
@ -29,7 +29,7 @@ Rectangle {
|
|||
anchors.rightMargin: replyPopup.width < 450 ? 2 * (22 + 16) : 3 * (22 + 16)
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: Nheko.paddingSmall
|
||||
eventId: room.reply ?? ""
|
||||
eventId: room?.reply ?? ""
|
||||
userColor: TimelineManager.userColor(modelData.userId, palette.window)
|
||||
visible: room && room.reply
|
||||
maxWidth: parent.width - anchors.leftMargin - anchors.rightMargin
|
||||
|
|
|
@ -4,10 +4,10 @@
|
|||
|
||||
import ".."
|
||||
import "../components"
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.5
|
||||
import QtQuick.Layouts 1.3
|
||||
import im.nheko 1.0
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import QtQuick.Layouts
|
||||
import im.nheko
|
||||
|
||||
|
||||
ApplicationWindow {
|
||||
|
|
|
@ -163,14 +163,20 @@ TimelineFilter::setSource(TimelineModel *s)
|
|||
|
||||
this->setSourceModel(s);
|
||||
|
||||
connect(s, &TimelineModel::currentIndexChanged, this, &TimelineFilter::currentIndexChanged);
|
||||
connect(
|
||||
s, &TimelineModel::fetchedMore, this, &TimelineFilter::fetchAgain, Qt::QueuedConnection);
|
||||
connect(s,
|
||||
&TimelineModel::dataChanged,
|
||||
this,
|
||||
&TimelineFilter::sourceDataChanged,
|
||||
Qt::QueuedConnection);
|
||||
if (s) {
|
||||
connect(
|
||||
s, &TimelineModel::currentIndexChanged, this, &TimelineFilter::currentIndexChanged);
|
||||
connect(s,
|
||||
&TimelineModel::fetchedMore,
|
||||
this,
|
||||
&TimelineFilter::fetchAgain,
|
||||
Qt::QueuedConnection);
|
||||
connect(s,
|
||||
&TimelineModel::dataChanged,
|
||||
this,
|
||||
&TimelineFilter::sourceDataChanged,
|
||||
Qt::QueuedConnection);
|
||||
}
|
||||
|
||||
// reset the search index a second time just to be safe.
|
||||
incrementalSearchIndex = 0;
|
||||
|
|
Loading…
Reference in a new issue