Files
MuditaOS/module-apps/application-calllog/windows/CallLogOptionsWindow.cpp
Alek Rudnik 16eaab6b50 Egd 3169 sms templates (#336)
* [EGD-3169] added sms templates model and item
fixed common class name convention

* [EGD-3169] added templates window
Passing template to new sms window is already working

* [EGD-3169] PR fixes from DB PR

* [EGD-3169] add universal callback for templates items

* [EGD-3169] requesting templates from more 2 windows

* [EGD-3169] missign change - display template in threads window

* [EGD-3169] minor fixes

* [EGD-3169] minimal clean up

* [EGD-3169] fixed some layout constatnt

* [EGD-3169] rem minor comments and logs

* [EGD-3089] rem redundant vector include

* [EGD-3169] PR fixes

* [EGD-3169] fixes afeter rebase

* [EGD-3169] workaround for list view issue - added 2 dump entries

* [EGD-3169] PR fixes

* [EGD-3169] style fixes

* [EGD-3169] fix for 0x0D char on enter in text widget

* [EGD-3169] PR fixes

* [EGD-3169] compilation issue
2020-04-30 13:48:23 +02:00

31 lines
1.0 KiB
C++

#include "CallLogOptionsWindow.hpp"
#include "i18/i18.hpp"
#include "log/log.hpp"
#include <Options.hpp>
/// below just for apps names...
std::list<gui::Option> calllogWindowOptions(app::ApplicationCallLog *app, const CalllogRecord &record)
{
auto searchResults = DBServiceAPI::ContactGetByID(app, record.getContactId());
std::list<gui::Option> options;
if (searchResults.get()->empty() || searchResults->front().contactType == ContactType::TEMPORARY) {
// add option - add contact
options.push_back(gui::options::contact(app, app::ContactOperation::Add, searchResults->front()));
}
else {
// add option - contact details
options.push_back(gui::options::contact(app, app::ContactOperation::Details, searchResults->front()));
}
// add option delete call option
options.push_back(gui::Option(
utils::localize.get("app_calllog_options_delete_call"),
[=](gui::Item &item) { return app->removeCalllogEntry(record); },
gui::Arrow::Disabled));
return options;
};