Make single newlines cause a <br> 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
This commit is contained in:
parent
9f529075f0
commit
0c3d46795b
8 changed files with 48 additions and 15 deletions
|
|
@ -6,11 +6,13 @@
|
|||
|
||||
#include "UserDirectoryModel.h"
|
||||
|
||||
#include <QSharedPointer>
|
||||
|
||||
#include <mtx/responses/users.hpp>
|
||||
|
||||
#include "Cache.h"
|
||||
#include "Logging.h"
|
||||
#include <QSharedPointer>
|
||||
#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<FetchUsersFromDirectoryJob>::create();
|
||||
connect(job.data(),
|
||||
|
|
@ -88,7 +90,8 @@ UserDirectoryModel::data(const QModelIndex &index, int role) const
|
|||
}
|
||||
|
||||
void
|
||||
UserDirectoryModel::displaySearchResults(std::vector<mtx::responses::User> results, const std::string &searchTerm)
|
||||
UserDirectoryModel::displaySearchResults(std::vector<mtx::responses::User> results,
|
||||
const std::string &searchTerm)
|
||||
{
|
||||
if (searchTerm != this->userSearchString_)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue