2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Move chats / contacts lists to Data::Session.

This commit is contained in:
John Preston
2019-04-16 18:05:56 +04:00
parent 2862070348
commit 0c0d6bc411
25 changed files with 441 additions and 496 deletions

View File

@@ -967,18 +967,6 @@ void MainWidget::cacheBackground() {
_cachedFor = _willCacheFor;
}
Dialogs::IndexedList *MainWidget::contactsList() {
return _dialogs->contactsList();
}
Dialogs::IndexedList *MainWidget::dialogsList() {
return _dialogs->dialogsList();
}
Dialogs::IndexedList *MainWidget::contactsNoDialogsList() {
return _dialogs->contactsNoDialogsList();
}
crl::time MainWidget::highlightStartTime(not_null<const HistoryItem*> item) const {
return _history->highlightStartTime(item);
}
@@ -1557,8 +1545,8 @@ bool MainWidget::viewsIncrementFail(const RPCError &error, mtpRequestId req) {
return false;
}
void MainWidget::createDialog(Dialogs::Key key) {
_dialogs->createDialog(key);
void MainWidget::refreshDialog(Dialogs::Key key) {
_dialogs->refreshDialog(key);
}
void MainWidget::choosePeer(PeerId peerId, MsgId showAtMsgId) {
@@ -3489,11 +3477,6 @@ void MainWidget::activate() {
App::wnd()->fixOrder();
}
void MainWidget::destroyData() {
_history->destroyData();
_dialogs->destroyData();
}
bool MainWidget::isActive() const {
return !_isIdle && isVisible() && !_a_show.animating();
}