Skip to content

Commit 03ae32d

Browse files
committed
[EGD-4079] List looping rebuild fix. Draft msg overwriting sms input text. Crush on contact details application exit fix. Special characters inserts no longer call onBeforeShow.
1 parent 022a374 commit 03ae32d

File tree

13 files changed

+29
-17
lines changed

13 files changed

+29
-17
lines changed

changelog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
* `[audio]` Fix parsing audio meta tags during playback
1818
* `[settings]` Removed the border around the settings menu.
1919
* `[simulator]` Fix crash on exit.
20+
* `[listview]` Looping rebuild fix.
21+
* `[messages]` Draft msg overwriting sms input text.
22+
* `[messages]` SMS bubble edges smoothing.
23+
* `[phonebook]` Crash on contact details application exit fix.
24+
* `[specialInput]` Special characters inserts no longer call onBeforeShow.
2025

2126
## [0.42.1 2020-10-12]
2227

module-apps/Application.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -400,14 +400,16 @@ namespace app
400400
// check if this is case where application is returning to the last visible window.
401401
if ((switchData != nullptr) && (msg->LastSeenWindow)) {}
402402
else {
403-
getCurrentWindow()->onBeforeShow(msg->getCommand(), switchData.get());
404403
auto ret = dynamic_cast<gui::SwitchSpecialChar *>(switchData.get());
405404
if (ret != nullptr && switchData != nullptr) {
406405
auto text = dynamic_cast<gui::Text *>(getCurrentWindow()->getFocusItem());
407406
if (text != nullptr) {
408407
text->addText(ret->getDescription());
408+
refreshWindow(gui::RefreshModes::GUI_REFRESH_FAST);
409+
return msgHandled();
409410
}
410411
}
412+
getCurrentWindow()->onBeforeShow(msg->getCommand(), switchData.get());
411413
}
412414
refreshWindow(gui::RefreshModes::GUI_REFRESH_DEEP);
413415
}

module-apps/application-messages/data/MessagesStyle.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ namespace style
6767

6868
namespace smsOutput
6969
{
70-
constexpr gui::Length sms_radius = 7;
70+
constexpr gui::Length sms_radius = 8;
7171
constexpr gui::Length default_h = 30;
7272
constexpr gui::Length sms_max_width = 320;
7373
constexpr gui::Length sms_h_padding = 15;

module-apps/application-messages/models/SMSThreadModel.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ auto SMSThreadModel::handleQueryResponse(db::QueryResult *queryResult) -> bool
7878

7979
resetInputWidget();
8080

81-
if (msgResponse->getDraft().isValid()) {
81+
if (msgResponse->getDraft().isValid() && smsInput->inputText->isEmpty()) {
8282
smsInput->draft = msgResponse->getDraft().type == SMSType::DRAFT
8383
? std::optional<SMSRecord>{msgResponse->getDraft()}
8484
: std::nullopt;

module-apps/application-phonebook/ApplicationPhonebook.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,6 @@ namespace app
9696
return ret;
9797
}
9898

99-
auto ApplicationPhonebook::DeinitHandler() -> sys::ReturnCodes
100-
{
101-
return sys::ReturnCodes::Success;
102-
}
103-
10499
void ApplicationPhonebook::createUserInterface()
105100
{
106101
windowsFactory.attach(gui::name::window::main_window, [](Application *app, const std::string &name) {

module-apps/application-phonebook/ApplicationPhonebook.hpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ namespace app
3333

3434
auto DataReceivedHandler(sys::DataMessage *msgl, sys::ResponseMessage *resp) -> sys::Message_t override;
3535
auto InitHandler() -> sys::ReturnCodes override;
36-
auto DeinitHandler() -> sys::ReturnCodes override;
3736

3837
auto SwitchPowerModeHandler(const sys::ServicePowerMode mode) -> sys::ReturnCodes final
3938
{

module-apps/application-phonebook/models/ContactDetailsModel.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
ContactDetailsModel::ContactDetailsModel(app::Application *app) : application(app)
1212
{}
1313

14+
void ContactDetailsModel::clearData()
15+
{
16+
list->clear();
17+
eraseInternalData();
18+
}
19+
1420
auto ContactDetailsModel::requestRecordsCount() -> unsigned int
1521
{
1622
return internalData.size();
@@ -53,8 +59,7 @@ void ContactDetailsModel::createData(bool showInformationWidget, bool showAddres
5359

5460
void ContactDetailsModel::loadData(std::shared_ptr<ContactRecord> contactRecord)
5561
{
56-
list->clear();
57-
eraseInternalData();
62+
clearData();
5863

5964
auto isInformationDataExist = [&]() -> bool {
6065
return contactRecord->numbers.size() > 0 || contactRecord->mail.length() > 0;

module-apps/application-phonebook/models/ContactDetailsModel.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ class ContactDetailsModel : public app::InternalModel<gui::ContactListItem *>, p
1414
public:
1515
ContactDetailsModel(app::Application *app);
1616

17+
void clearData();
1718
void loadData(std::shared_ptr<ContactRecord> contactRecord);
1819

1920
[[nodiscard]] auto requestRecordsCount() -> unsigned int override;

module-apps/application-phonebook/windows/PhonebookContactDetails.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ namespace gui
4343
erase();
4444
}
4545

46+
void PhonebookContactDetails::onClose()
47+
{
48+
contactDetailsModel->clearData();
49+
}
50+
4651
PhonebookContactDetails::~PhonebookContactDetails()
4752
{
4853
destroyInterface();
@@ -128,5 +133,4 @@ namespace gui
128133

129134
return false;
130135
}
131-
132136
} // namespace gui

module-apps/application-phonebook/windows/PhonebookContactDetails.hpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ namespace gui
1919
auto onInput(const InputEvent &inputEvent) -> bool override;
2020
void onBeforeShow(ShowMode mode, SwitchData *data) override;
2121
auto handleSwitchData(SwitchData *data) -> bool override;
22+
void onClose() override;
2223
void rebuild() override;
2324
void buildInterface() override;
2425
void destroyInterface() override;

0 commit comments

Comments
 (0)