summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorkamathmanu <manuriddle@gmail.com>2021-08-04 14:12:10 -0400
committerkamathmanu <manuriddle@gmail.com>2021-08-07 17:00:28 -0400
commit4ec0c8c9bb384dcaeb9c18bb359cbd4e1e95e9c1 (patch)
tree497595085f6a4413b2453292812ca4c3f1f0865b /src
parentFixed anchoring/positioning of delegate items and join room display (diff)
downloadnheko-4ec0c8c9bb384dcaeb9c18bb359cbd4e1e95e9c1.tar.xz
make lint
Diffstat (limited to 'src')
-rw-r--r--src/RoomDirectoryModel.cpp11
-rw-r--r--src/RoomDirectoryModel.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/src/RoomDirectoryModel.cpp b/src/RoomDirectoryModel.cpp

index b206bf9e..6cb7a4fb 100644 --- a/src/RoomDirectoryModel.cpp +++ b/src/RoomDirectoryModel.cpp
@@ -3,8 +3,8 @@ // SPDX-License-Identifier: GPL-3.0-or-later #include "RoomDirectoryModel.h" -#include "ChatPage.h" #include "Cache.h" +#include "ChatPage.h" #include <algorithm> @@ -69,14 +69,13 @@ RoomDirectoryModel::setSearchTerm(const QString &f) resetDisplayedData(); } - bool RoomDirectoryModel::canJoinRoom(const QByteArray &room) { - const auto &cache = cache::roomInfo(); - const QString room_id (room); - const bool validRoom = !room_id.isNull() && !room_id.isEmpty(); - return validRoom && !cache.contains(room_id); + const auto &cache = cache::roomInfo(); + const QString room_id(room); + const bool validRoom = !room_id.isNull() && !room_id.isEmpty(); + return validRoom && !cache.contains(room_id); } std::vector<std::string> diff --git a/src/RoomDirectoryModel.h b/src/RoomDirectoryModel.h
index 7099ff00..c7089a1e 100644 --- a/src/RoomDirectoryModel.h +++ b/src/RoomDirectoryModel.h
@@ -56,7 +56,7 @@ public: } void fetchMore(const QModelIndex &) override; - Q_INVOKABLE bool canJoinRoom(const QByteArray &room); + Q_INVOKABLE bool canJoinRoom(const QByteArray &room); Q_INVOKABLE void joinRoom(const int &index = -1); signals: