add doc write lock and make imgui use it
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include <solanaceae/contact/fwd.hpp>
|
||||
|
||||
#include <set>
|
||||
#include <unordered_set>
|
||||
|
||||
class CRDTNotesImGui {
|
||||
CRDTNotes& _notes;
|
||||
@@ -13,6 +14,9 @@ class CRDTNotesImGui {
|
||||
bool _show_global_list {true};
|
||||
|
||||
std::set<CRDTNotes::DocID> _open_docs;
|
||||
std::unordered_set<CRDTNotes::DocWriteLock> _held_locks;
|
||||
|
||||
std::unordered_set<CRDTNotes::DocWriteLock>::iterator findLock(const CRDTNotes::DocID& doc_id);
|
||||
|
||||
public:
|
||||
CRDTNotesImGui(CRDTNotes& notes, CRDTNotesSync& notes_sync, ContactStore4I& cs);
|
||||
@@ -22,6 +26,5 @@ class CRDTNotesImGui {
|
||||
bool renderContactListContactSmall(const Contact4 c, const bool selected) const;
|
||||
|
||||
bool renderDoc(const CRDTNotes::DocID& doc_id);
|
||||
bool renderDocText(std::string& text) const;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user