mirror of
https://github.com/mudita/MuditaOS.git
synced 2026-04-21 07:28:21 -04:00
This PR provides implementation of home screen notification for `notSeen` messages received from a single number. The "single-number: `notSeen` message notification distinct from "multiple-number" notification with the following features: - displaying formatted contact name - `onActivated` it switches to respective thread window (instead of all thread window) in `ApplicationMessages` The PR also introduced some `ActiveNotificationsModel` code refactor to align the implementation with `Single Responsibility Principle`
40 lines
1.0 KiB
C++
40 lines
1.0 KiB
C++
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
|
|
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
|
|
|
|
#include "QueryThreadGetByNumber.hpp"
|
|
|
|
#include <Interface/ThreadRecord.hpp>
|
|
#include <PhoneNumber.hpp>
|
|
|
|
#include <string>
|
|
|
|
namespace db::query
|
|
{
|
|
ThreadGetByNumber::ThreadGetByNumber(const utils::PhoneNumber::View &number)
|
|
: Query(Query::Type::Read), number(number)
|
|
{}
|
|
|
|
auto ThreadGetByNumber::getNumber() const -> const utils::PhoneNumber::View &
|
|
{
|
|
return number;
|
|
}
|
|
|
|
[[nodiscard]] auto ThreadGetByNumber::debugInfo() const -> std::string
|
|
{
|
|
return "ThreadGetByNumber";
|
|
}
|
|
|
|
ThreadGetByNumberResult::ThreadGetByNumberResult(ThreadRecord thread) : thread(std::move(thread))
|
|
{}
|
|
|
|
auto ThreadGetByNumberResult::getThread() -> ThreadRecord
|
|
{
|
|
return std::move(thread);
|
|
}
|
|
|
|
[[nodiscard]] auto ThreadGetByNumberResult::debugInfo() const -> std::string
|
|
{
|
|
return "ThreadGetByNumberResult";
|
|
}
|
|
} // namespace db::query
|