internal void SetParams(RichMessage richMessage, bool expired, ICommand dismissModalDialogCommand)
        {
            _richMessageCache = richMessage;

            this.DismissModalDialogCommand = dismissModalDialogCommand;

            if (!expired)
            {
                HTML5 = richMessage.Body;
            }
            else
            {
                HTML5 = richMessage.ExpiredBody;
            }
        }
 public AllIdiomsRichMessageInboxPopupPage(RichMessage richMessage, bool expired, ICommand dismissModalDialogCommand)
 {
     InitializeComponent();
     ((RichMessageInboxPopupPageViewModel)this.BindingContext).LoadNavigator(this.Navigation);
     ((RichMessageInboxPopupPageViewModel)this.BindingContext).SetParams(richMessage, expired, dismissModalDialogCommand);
 }
        private bool DeleteStatus(RichMessage message)
        {
            bool result = false;
            List<DateTime> expiryMatix = new List<DateTime>();

            var richMessageAvailabilityDays = ConfigurationManager.GetValue<string>("RichMessageAvailabilityDays");

            var timeNow = DateTime.UtcNow;
            var richMessageReceivedTime = message.ReceivedTimestamp;

            var richMessageExpiryTime = message.ExpiryTimeStamp;
            var richMessageAvailabilityExpiry = ((DateTime)richMessageReceivedTime).AddDays(Convert.ToInt32(richMessageAvailabilityDays));

            if (richMessageExpiryTime != null)
            {
                expiryMatix.Add((DateTime)richMessageExpiryTime);
            }

            if (richMessageAvailabilityExpiry != null)
            {
                expiryMatix.Add((DateTime)richMessageAvailabilityExpiry);
            }

            expiryMatix.Sort((a, b) => a.CompareTo(b));

            var earliest = expiryMatix.FirstOrDefault();

            if(timeNow < earliest)
            {
                result = false;
            }
            else
            {
                result = true;
            }

            return result;
        }
		public NavigateToRichMessageEvent(RichMessage message)
		{
			Message = message;
		}