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`
37 lines
956 B
C++
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
|