Browse Source

PushNotifications: add Notification copy constructor.

tags/2021-05-28
Lukasz Kozakiewicz 7 years ago
parent
commit
8ddbcc1f10
2 changed files with 41 additions and 0 deletions
  1. +40
    -0
      modules/juce_gui_extra/misc/juce_PushNotifications.cpp
  2. +1
    -0
      modules/juce_gui_extra/misc/juce_PushNotifications.h

+ 40
- 0
modules/juce_gui_extra/misc/juce_PushNotifications.cpp View File

@@ -32,6 +32,46 @@ namespace juce
bool PushNotifications::Notification::isValid() const noexcept { return true; }
#endif
PushNotifications::Notification::Notification (const Notification& other)
: identifier (other.identifier),
title (other.title),
body (other.body),
subtitle (other.subtitle),
groupId (other.groupId),
badgeNumber (other.badgeNumber),
soundToPlay (other.soundToPlay),
properties (other.properties),
category (other.category),
triggerIntervalSec (other.triggerIntervalSec),
repeat (other.repeat),
icon (other.icon),
channelId (other.channelId),
largeIcon (other.largeIcon),
tickerText (other.tickerText),
actions (other.actions),
progress (other.progress),
person (other.person),
type (other.type),
priority (other.priority),
lockScreenAppearance (other.lockScreenAppearance),
publicVersion (other.publicVersion.get() != nullptr ? new Notification (*other.publicVersion) : nullptr),
groupSortKey (other.groupSortKey),
groupSummary (other.groupSummary),
accentColour (other.accentColour),
ledColour (other.ledColour),
ledBlinkPattern (other.ledBlinkPattern),
vibrationPattern (other.vibrationPattern),
shouldAutoCancel (other.shouldAutoCancel),
localOnly (other.localOnly),
ongoing (other.ongoing),
alertOnlyOnce (other.alertOnlyOnce),
timestampVisibility (other.timestampVisibility),
badgeIconType (other.badgeIconType),
groupAlertBehaviour (other.groupAlertBehaviour),
timeoutAfterMs (other.timeoutAfterMs)
{
}
//==============================================================================
JUCE_IMPLEMENT_SINGLETON (PushNotifications)


+ 1
- 0
modules/juce_gui_extra/misc/juce_PushNotifications.h View File

@@ -53,6 +53,7 @@ public:
struct Notification
{
Notification() = default;
Notification (const Notification& other);
/** Checks whether a given notification is correctly configured for a given OS. */
bool isValid() const noexcept;


Loading…
Cancel
Save