Files
MuditaOS/module-db/queries/messages/threads/QueryThreadGetByNumber.hpp
Michał Kamoń f2ce6e946b [EGD-6707] Add single number message notification
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`
2021-05-18 17:19:30 +02:00

37 lines
956 B
C++

// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
#include <Common/Query.hpp>
#include <Interface/ThreadRecord.hpp>
#include <PhoneNumber.hpp>
#include <string>
namespace db::query
{
class ThreadGetByNumber : public Query
{
utils::PhoneNumber::View number;
public:
explicit ThreadGetByNumber(const utils::PhoneNumber::View &number);
[[nodiscard]] auto getNumber() const -> const utils::PhoneNumber::View &;
[[nodiscard]] auto debugInfo() const -> std::string override;
};
class ThreadGetByNumberResult : public QueryResult
{
ThreadRecord thread;
public:
explicit ThreadGetByNumberResult(ThreadRecord record);
[[nodiscard]] auto getThread() -> ThreadRecord;
[[nodiscard]] auto debugInfo() const -> std::string override;
};
}; // namespace db::query