mirror of https://github.com/kiwix/libkiwix.git
Library.removeBookById() drops the reader too
This fix makes the `XmlLibraryTest.removeBookByIdDropsTheReader` unit-test pass.
This commit is contained in:
parent
ccdc316217
commit
24ed96a38c
|
@ -106,6 +106,7 @@ bool Library::removeBookmark(const std::string& zimId, const std::string& url)
|
||||||
|
|
||||||
bool Library::removeBookById(const std::string& id)
|
bool Library::removeBookById(const std::string& id)
|
||||||
{
|
{
|
||||||
|
m_readers.erase(id);
|
||||||
return m_books.erase(id) == 1;
|
return m_books.erase(id) == 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue