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

Cache media search results until empty query.

This commit is contained in:
John Preston
2017-10-31 11:03:18 +04:00
parent eb2719fad1
commit c9152b0b3a
5 changed files with 281 additions and 67 deletions

View File

@@ -38,6 +38,7 @@ class event_stream {
public:
event_stream();
event_stream(event_stream &&other);
event_stream &operator=(event_stream &&other);
template <typename OtherValue>
void fire_forward(OtherValue &&value) const;
@@ -90,6 +91,13 @@ inline event_stream<Value>::event_stream(event_stream &&other)
: _consumers(base::take(other._consumers)) {
}
template <typename Value>
inline event_stream<Value> &event_stream<Value>::operator=(
event_stream &&other) {
_consumers = base::take(other._consumers);
return *this;
}
template <typename Value>
template <typename OtherValue>
inline void event_stream<Value>::fire_forward(