update// implemented dump method to each datastoretype

This commit is contained in:
Strider
2020-05-17 14:12:27 +02:00
parent 4f584ac86e
commit d4bf7a83c8
14 changed files with 183 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
#include "settings.h"
#include "mainwindow.h"
#include "controller.h"
#include "DataStore/DataStore.h"
#include "FileSystem/FileSystem.h"
@@ -398,6 +399,13 @@ void AddressBook::readFromStorage()
}
}*/
allLabels = FileSystem::getInstance()->readContacts(AddressBook::writeableFile());
// test to see if the contact items in datastore are correctly dumped to json
for(ContactItem item: allLabels)
{
DataStore::getContactDataStore()->setData(item.getCid(), item);
}
DataStore::getContactDataStore()->dump();
}
void AddressBook::writeToStorage()