wsd/SenderQueue.hpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+)
New commits: commit 2b9e695a3be4f009b954e0891821ccb9ff53420a Author: Ashod Nakashian <[email protected]> Date: Sun Dec 18 17:48:44 2016 -0500 wsd: deduplicate more messages Change-Id: I0ad9ef7bf826b3fd0eba9cc17ec5212a3334a2f5 Reviewed-on: https://gerrit.libreoffice.org/32163 Reviewed-by: Ashod Nakashian <[email protected]> Tested-by: Ashod Nakashian <[email protected]> diff --git a/wsd/SenderQueue.hpp b/wsd/SenderQueue.hpp index 3c42264..fd452bf 100644 --- a/wsd/SenderQueue.hpp +++ b/wsd/SenderQueue.hpp @@ -211,6 +211,22 @@ private: _queue.erase(pos); } } + else if (command == "statusindicatorsetvalue:" || + command == "invalidatecursor:") + { + // Remove previous identical enties of this command, + // if any, and use most recent (incoming). + const auto& pos = std::find_if(_queue.begin(), _queue.end(), + [&command](const queue_item_t& cur) + { + return (cur->firstToken() == command); + }); + + if (pos != _queue.end()) + { + _queue.erase(pos); + } + } else if (command == "invalidateviewcursor:") { // Remove previous cursor invalidation for same view, _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
