mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 19:08:58 +03:00
fix linting
This commit is contained in:
parent
a305c2689c
commit
1be42045ee
5 changed files with 131 additions and 126 deletions
|
@ -308,7 +308,8 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
|
|||
&ChatPage::setGroupViewState);
|
||||
|
||||
connect(this, &ChatPage::initializeRoomList, room_list_, &RoomList::initialize);
|
||||
connect(this,
|
||||
connect(
|
||||
this,
|
||||
&ChatPage::initializeViews,
|
||||
view_manager_,
|
||||
[this](const mtx::responses::Rooms &rooms) { view_manager_->sync(rooms); },
|
||||
|
@ -377,7 +378,8 @@ ChatPage::ChatPage(QSharedPointer<UserSettings> userSettings, QWidget *parent)
|
|||
connect(
|
||||
this, &ChatPage::tryInitialSyncCb, this, &ChatPage::tryInitialSync, Qt::QueuedConnection);
|
||||
connect(this, &ChatPage::trySyncCb, this, &ChatPage::trySync, Qt::QueuedConnection);
|
||||
connect(this,
|
||||
connect(
|
||||
this,
|
||||
&ChatPage::tryDelayedSyncCb,
|
||||
this,
|
||||
[this]() { QTimer::singleShot(RETRY_TIMEOUT, this, &ChatPage::trySync); },
|
||||
|
|
|
@ -45,7 +45,8 @@ CompletionProxyModel::CompletionProxyModel(QAbstractItemModel *model, QObject *p
|
|||
}
|
||||
}
|
||||
|
||||
connect(this,
|
||||
connect(
|
||||
this,
|
||||
&CompletionProxyModel::newSearchString,
|
||||
this,
|
||||
[this](QString s) {
|
||||
|
|
|
@ -39,7 +39,8 @@ EventStore::EventStore(std::string room_id, QObject *)
|
|||
this->last = range->last;
|
||||
}
|
||||
|
||||
connect(this,
|
||||
connect(
|
||||
this,
|
||||
&EventStore::eventFetched,
|
||||
this,
|
||||
[this](std::string id,
|
||||
|
@ -55,7 +56,8 @@ EventStore::EventStore(std::string room_id, QObject *)
|
|||
},
|
||||
Qt::QueuedConnection);
|
||||
|
||||
connect(this,
|
||||
connect(
|
||||
this,
|
||||
&EventStore::oldMessagesRetrieved,
|
||||
this,
|
||||
[this](const mtx::responses::Messages &res) {
|
||||
|
@ -79,8 +81,7 @@ EventStore::EventStore(std::string room_id, QObject *)
|
|||
auto range = cache::client()->getTimelineRange(room_id_);
|
||||
|
||||
if (range && range->last - range->first != 0) {
|
||||
emit beginInsertRows(
|
||||
0, int(range->last - range->first));
|
||||
emit beginInsertRows(0, int(range->last - range->first));
|
||||
this->first = range->first;
|
||||
this->last = range->last;
|
||||
emit endInsertRows();
|
||||
|
@ -156,7 +157,8 @@ EventStore::EventStore(std::string room_id, QObject *)
|
|||
event->data);
|
||||
});
|
||||
|
||||
connect(this,
|
||||
connect(
|
||||
this,
|
||||
&EventStore::messageFailed,
|
||||
this,
|
||||
[this](std::string txn_id) {
|
||||
|
@ -176,7 +178,8 @@ EventStore::EventStore(std::string room_id, QObject *)
|
|||
},
|
||||
Qt::QueuedConnection);
|
||||
|
||||
connect(this,
|
||||
connect(
|
||||
this,
|
||||
&EventStore::messageSent,
|
||||
this,
|
||||
[this](std::string txn_id, std::string event_id) {
|
||||
|
@ -361,7 +364,7 @@ struct overloaded : Ts...
|
|||
using Ts::operator()...;
|
||||
};
|
||||
template<class... Ts>
|
||||
overloaded(Ts...)->overloaded<Ts...>;
|
||||
overloaded(Ts...) -> overloaded<Ts...>;
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -209,7 +209,8 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj
|
|||
, room_id_(room_id)
|
||||
, manager_(manager)
|
||||
{
|
||||
connect(this,
|
||||
connect(
|
||||
this,
|
||||
&TimelineModel::redactionFailed,
|
||||
this,
|
||||
[](const QString &msg) { emit ChatPage::instance()->showNotification(msg); },
|
||||
|
@ -222,13 +223,13 @@ TimelineModel::TimelineModel(TimelineViewManager *manager, QString room_id, QObj
|
|||
Qt::QueuedConnection);
|
||||
connect(this, &TimelineModel::addPendingMessageToStore, &events, &EventStore::addPending);
|
||||
|
||||
connect(&events,
|
||||
connect(
|
||||
&events,
|
||||
&EventStore::dataChanged,
|
||||
this,
|
||||
[this](int from, int to) {
|
||||
nhlog::ui()->debug("data changed {} to {}",
|
||||
events.size() - to - 1,
|
||||
events.size() - from - 1);
|
||||
nhlog::ui()->debug(
|
||||
"data changed {} to {}", events.size() - to - 1, events.size() - from - 1);
|
||||
emit dataChanged(index(events.size() - to - 1, 0),
|
||||
index(events.size() - from - 1, 0));
|
||||
},
|
||||
|
|
|
@ -32,9 +32,7 @@ SnackBar::SnackBar(QWidget *parent)
|
|||
offset_anim.setDuration(100);
|
||||
offset_anim.setEasingCurve(QEasingCurve::OutCubic);
|
||||
|
||||
connect(this, &SnackBar::offsetChanged, this, [this]() mutable {
|
||||
repaint();
|
||||
});
|
||||
connect(this, &SnackBar::offsetChanged, this, [this]() mutable { repaint(); });
|
||||
connect(
|
||||
&offset_anim, &QPropertyAnimation::finished, this, [this]() { hideTimer_.start(10000); });
|
||||
|
||||
|
|
Loading…
Reference in a new issue