[EGD-2392] SMS Feed window added

This commit is contained in:
Adam Dobrowolski
2019-12-09 10:08:55 +01:00
committed by pholat
parent 635d5d8d29
commit 41b6df457c
11 changed files with 270 additions and 95 deletions

View File

@@ -11,6 +11,7 @@
#include "Application.hpp"
#include "../MessagesStyle.hpp"
#include "../windows/ThreadViewWindow.hpp" // for name of window
#include "service-db/api/DBServiceAPI.hpp"
ThreadModel::ThreadModel(app::Application *app) :
@@ -55,11 +56,19 @@ gui::ListItem* ThreadModel::getItem(int index, int fistElement, int prevElement,
if (item != nullptr) {
item->setThreadItem(thread);
item->setID(index);
item->activatedCallback = [=](gui::Item &item) {
LOG_INFO("ThreadItem ActivatedCallback");
return true;
};
return item;
}
item->activatedCallback = [=](gui::Item &item) {
LOG_INFO("ThreadItem ActivatedCallback");
if (application)
{
application->switchWindow(gui::name::window::thread_view, nullptr);
}
else
{
LOG_ERROR("No application!");
}
return true;
};
return item;
}
return nullptr;
}