2
0
mirror of https://github.com/kotatogram/kotatogram-desktop synced 2025-08-31 06:35:14 +00:00

Improve items resize in history and feed.

This commit is contained in:
John Preston
2018-01-19 20:10:58 +03:00
parent e6baf8ef5b
commit b91ebad8be
31 changed files with 311 additions and 333 deletions

View File

@@ -340,12 +340,7 @@ void historyMuteUpdated(History *history) {
if (MainWidget *m = App::main()) m->notify_historyMuteUpdated(history);
}
void handlePendingHistoryUpdate() {
if (!AuthSession::Exists()) {
return;
}
Auth().data().pendingHistoryResize().notify(true);
//void handlePendingHistoryUpdate() {
//for (const auto item : base::take(Global::RefPendingRepaintItems())) {
// Auth().data().requestItemRepaint(item);
@@ -370,7 +365,7 @@ void handlePendingHistoryUpdate() {
// }
//}
//}
}
//}
void unreadCounterUpdated() {
Global::RefHandleUnreadCounterUpdate().call();
@@ -515,7 +510,6 @@ namespace Global {
namespace internal {
struct Data {
SingleQueuedInvokation HandleHistoryUpdate = { [] { Messenger::Instance().call_handleHistoryUpdate(); } };
SingleQueuedInvokation HandleUnreadCounterUpdate = { [] { Messenger::Instance().call_handleUnreadCounterUpdate(); } };
SingleQueuedInvokation HandleDelayedPeerUpdates = { [] { Messenger::Instance().call_handleDelayedPeerUpdates(); } };
SingleQueuedInvokation HandleObservables = { [] { Messenger::Instance().call_handleObservables(); } };
@@ -636,7 +630,6 @@ void finish() {
GlobalData = nullptr;
}
DefineRefVar(Global, SingleQueuedInvokation, HandleHistoryUpdate);
DefineRefVar(Global, SingleQueuedInvokation, HandleUnreadCounterUpdate);
DefineRefVar(Global, SingleQueuedInvokation, HandleDelayedPeerUpdates);
DefineRefVar(Global, SingleQueuedInvokation, HandleObservables);