scan laters

This commit is contained in:
Green Sky 2024-02-16 19:55:07 +01:00
parent 2e7d5538d1
commit 97aedca844
No known key found for this signature in database
3 changed files with 8 additions and 2 deletions

View File

@ -250,8 +250,6 @@ MessageFragmentStore::MessageFragmentStore(
_sc.registerDeSerializerJson<Message::Components::Transfer::FileInfoLocal>(); _sc.registerDeSerializerJson<Message::Components::Transfer::FileInfoLocal>();
_sc.registerSerializerJson<Message::Components::Transfer::TagHaveAll>(); _sc.registerSerializerJson<Message::Components::Transfer::TagHaveAll>();
_sc.registerDeSerializerJson<Message::Components::Transfer::TagHaveAll>(); _sc.registerDeSerializerJson<Message::Components::Transfer::TagHaveAll>();
_fs.scanStoragePath("test_message_store/");
} }
MessageFragmentStore::~MessageFragmentStore(void) { MessageFragmentStore::~MessageFragmentStore(void) {
@ -313,6 +311,10 @@ float MessageFragmentStore::tick(float time_delta) {
return 1000.f*60.f*60.f; return 1000.f*60.f*60.f;
} }
void MessageFragmentStore::triggerScan(void) {
_fs.scanStoragePath("test_message_store/");
}
bool MessageFragmentStore::onEvent(const Message::Events::MessageConstruct& e) { bool MessageFragmentStore::onEvent(const Message::Events::MessageConstruct& e) {
handleMessage(e.e); handleMessage(e.e);
return false; return false;

View File

@ -71,6 +71,8 @@ class MessageFragmentStore : public RegistryMessageModelEventI {
float tick(float time_delta); float tick(float time_delta);
void triggerScan(void);
protected: // rmm protected: // rmm
bool onEvent(const Message::Events::MessageConstruct& e) override; bool onEvent(const Message::Events::MessageConstruct& e) override;
bool onEvent(const Message::Events::MessageUpdated& e) override; bool onEvent(const Message::Events::MessageUpdated& e) override;

View File

@ -80,6 +80,8 @@ MainScreen::MainScreen(SDL_Renderer* renderer_, std::string save_path, std::stri
} }
conf.dump(); conf.dump();
mfs.triggerScan(); // HACK: after plugins and tox contacts got loaded
} }
MainScreen::~MainScreen(void) { MainScreen::~MainScreen(void) {