diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-10-17 00:57:29 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2020-10-17 00:57:29 +0200 |
commit | bd0deb721322ed23551bf9d9d291637a147cc987 (patch) | |
tree | dfe6483d52c50c2d2ad7aa50f0cf17d0e1a1f459 /src/RoomInfoListItem.cpp | |
parent | Answer key requests for all our sessions (diff) | |
download | nheko-bd0deb721322ed23551bf9d9d291637a147cc987.tar.xz |
Fix crash on exit
Diffstat (limited to 'src/RoomInfoListItem.cpp')
-rw-r--r-- | src/RoomInfoListItem.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/RoomInfoListItem.cpp b/src/RoomInfoListItem.cpp index f234b59b..985ab1b9 100644 --- a/src/RoomInfoListItem.cpp +++ b/src/RoomInfoListItem.cpp @@ -203,10 +203,7 @@ RoomInfoListItem::init(QWidget *parent) }); } -RoomInfoListItem::RoomInfoListItem(QString room_id, - const RoomInfo &info, - QSharedPointer<UserSettings> userSettings, - QWidget *parent) +RoomInfoListItem::RoomInfoListItem(QString room_id, const RoomInfo &info, QWidget *parent) : QWidget(parent) , roomType_{info.is_invite ? RoomType::Invited : RoomType::Joined} , roomId_(std::move(room_id)) @@ -214,7 +211,6 @@ RoomInfoListItem::RoomInfoListItem(QString room_id, , isPressed_(false) , unreadMsgCount_(0) , unreadHighlightedMsgCount_(0) - , settings(userSettings) { init(parent); } @@ -451,7 +447,7 @@ RoomInfoListItem::calculateImportance() const // returns ImportanceDisabled or Invite if (isInvite()) { return Invite; - } else if (!settings->sortByImportance()) { + } else if (!ChatPage::instance()->userSettings()->sortByImportance()) { return ImportanceDisabled; } else if (unreadHighlightedMsgCount_) { return NewMentions; |