mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-05 09:05:14 +00:00
prepared 0.5.13 - greatly improved network support (bad_msg_notification handle, connecting notification, dc full config embed, getting config each launch, dc option notify handle, enum dc for new config
This commit is contained in:
@@ -906,7 +906,6 @@ DialogsListWidget::SearchResults &DialogsListWidget::searchList() {
|
||||
}
|
||||
|
||||
DialogsWidget::DialogsWidget(MainWidget *parent) : QWidget(parent)
|
||||
, _configLoaded(false)
|
||||
, _drawShadow(true)
|
||||
, dlgOffset(0)
|
||||
, dlgCount(-1)
|
||||
@@ -1070,7 +1069,6 @@ void DialogsWidget::dialogsReceived(const MTPmessages_Dialogs &dialogs) {
|
||||
}
|
||||
} else {
|
||||
dlgCount = dlgOffset;
|
||||
loadConfig();
|
||||
}
|
||||
|
||||
dlgPreloading = 0;
|
||||
@@ -1137,19 +1135,9 @@ void DialogsWidget::onSearchMore(MsgId minMsgId) {
|
||||
}
|
||||
}
|
||||
|
||||
void DialogsWidget::loadConfig() {
|
||||
if (!_configLoaded) {
|
||||
mtpConfigLoader()->load();
|
||||
_configLoaded = true;
|
||||
}
|
||||
}
|
||||
|
||||
void DialogsWidget::loadDialogs() {
|
||||
if (dlgPreloading) return;
|
||||
if (dlgCount >= 0 && dlgOffset >= dlgCount) {
|
||||
loadConfig();
|
||||
return;
|
||||
}
|
||||
if (dlgCount >= 0 && dlgOffset >= dlgCount) return;
|
||||
|
||||
int32 loadCount = dlgOffset ? DialogsPerPage : DialogsFirstLoad;
|
||||
dlgPreloading = MTP::send(MTPmessages_GetDialogs(MTP_int(dlgOffset), MTP_int(0), MTP_int(loadCount)), rpcDone(&DialogsWidget::dialogsReceived), rpcFail(&DialogsWidget::dialogsFailed));
|
||||
|
Reference in New Issue
Block a user