From 0c3d46795b589d9dfb2e6caa7f94db77fd5371bd Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Tue, 31 Jan 2023 18:22:12 +0100 Subject: Make single newlines cause a
by default This should match what people expect from a chat application much better. The biggest reason not to do this, is because some people might paste markdown documents. For those people there is now a /cmark command, which disables most of our extensions to cmark, including the newline behaviour. There is a long discussion on the Fediverse and on Github linked below. Mastodon https://fosstodon.org/@deepbluev7/109771668066978726 fixes #757 --- src/UserDirectoryModel.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'src/UserDirectoryModel.cpp') diff --git a/src/UserDirectoryModel.cpp b/src/UserDirectoryModel.cpp index 2c44df40..37753ad8 100644 --- a/src/UserDirectoryModel.cpp +++ b/src/UserDirectoryModel.cpp @@ -6,11 +6,13 @@ #include "UserDirectoryModel.h" +#include + +#include + #include "Cache.h" #include "Logging.h" -#include #include "MatrixClient.h" -#include "mtx/responses/users.hpp" UserDirectoryModel::UserDirectoryModel(QObject *parent) : QAbstractListModel{parent} @@ -49,7 +51,7 @@ UserDirectoryModel::fetchMore(const QModelIndex &) nhlog::net()->debug("Fetching users from mtxclient..."); std::string searchTerm = userSearchString_; - searchingUsers_ = true; + searchingUsers_ = true; emit searchingUsersChanged(); auto job = QSharedPointer::create(); connect(job.data(), @@ -88,7 +90,8 @@ UserDirectoryModel::data(const QModelIndex &index, int role) const } void -UserDirectoryModel::displaySearchResults(std::vector results, const std::string &searchTerm) +UserDirectoryModel::displaySearchResults(std::vector results, + const std::string &searchTerm) { if (searchTerm != this->userSearchString_) return; -- cgit 1.5.1