diff --git a/src/chat_gui4.cpp b/src/chat_gui4.cpp index 0172d98c..e220c3d4 100644 --- a/src/chat_gui4.cpp +++ b/src/chat_gui4.cpp @@ -389,6 +389,9 @@ float ChatGui4::render(float time_delta) { msg_reg.emplace_or_replace(e, ts_now); msg_reg.remove(e); msg_reg.emplace_or_replace(e, 1.f); + + // we remove the unread tag here + _rmm.throwEventUpdate(msg_reg, e); } // track view diff --git a/src/fragment_store/message_fragment_store.cpp b/src/fragment_store/message_fragment_store.cpp index 33ef4665..7797b101 100644 --- a/src/fragment_store/message_fragment_store.cpp +++ b/src/fragment_store/message_fragment_store.cpp @@ -95,6 +95,7 @@ void MessageFragmentStore::handleMessage(const Message3Handle& m) { return; } + // TODO: use fid, seving full fuid for every message consumes alot of memory (and heap frag) if (!m.all_of()) { std::cout << "MFS: new msg missing FUID\n"; if (!m.registry()->ctx().contains()) { @@ -268,7 +269,9 @@ void MessageFragmentStore::handleMessage(const Message3Handle& m) { _fuid_save_queue.push({Message::getTimeMS(), fragment_uid, m.registry()}); } - // TODO: do we use fid? + // TODO: save updates, and not only new messages (read state etc) + // new fragment?, since we dont write to others fragments? + // on new message: assign fuid // on new and update: mark as fragment dirty diff --git a/src/fragment_store/message_fragment_store.hpp b/src/fragment_store/message_fragment_store.hpp index 7a68f597..ea854e91 100644 --- a/src/fragment_store/message_fragment_store.hpp +++ b/src/fragment_store/message_fragment_store.hpp @@ -29,7 +29,7 @@ namespace Message::Components { // points to the front/newer message // together they define a range that is, // eg the first(end) and last(begin) message being rendered - // MFS requires there to be atleast one other message after/before, + // MFS requires there to be atleast one other fragment after/before, // if not loaded fragment with fitting tsrange(direction) available // uses fragmentAfter/Before() // they can exist standalone @@ -42,6 +42,9 @@ namespace Message::Components { Message3 curser_begin{entt::null}; }; + // TODO: add adjacency range comp or inside curser + + // TODO: unused // mfs will only load a limited number of fragments per tick (1), // so this tag will be set if we loaded a fragment and // every tick we check all cursers for this tag and continue