From 53d366d11b8a54973c91619e45eebaf1af94b1f8 Mon Sep 17 00:00:00 2001 From: Suneeth Keerthy Date: Wed, 25 Sep 2019 15:28:43 -0400 Subject: [PATCH] Commented out time logic as it was causing some errors Signed-off-by: Suneeth Keerthy --- .../launchbar-widget.component.ts | 28 +++++++++---------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts index 4b6dc2e0f..1783638ff 100644 --- a/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts +++ b/virtual-desktop/src/app/window-manager/mvd-window-manager/launchbar/launchbar-widget/launchbar-widget.component.ts @@ -162,25 +162,25 @@ export class LaunchbarWidgetComponent implements MVDHosting.ZoweNotificationWatc if (imgSrc === "") { imgSrc = require('../../../../../assets/images/launchbar/notifications/zowe.png') } - let currentDate = new Date(); - let notificationTime = notification['notification'].date.toString().split('T')[1].split('.')[0] - let currentTime = currentDate.toUTCString().split(' ')[4] +// let currentDate = new Date(); +// let notificationTime = notification['notification'].date.toString().split('T')[1].split('.')[0] +// let currentTime = currentDate.toUTCString().split(' ')[4] // This logic is wrong but kinda works, if one minute changes then all the minutes change // Need to also do logic about if more than a day - let hourDifference = parseInt(currentTime.split(':')[0]) - parseInt(notificationTime.split(':')[0]) - let minuteDifference = parseInt(currentTime.split(':')[1]) - parseInt(notificationTime.split(':')[1]) - let timeSince: string; - if (hourDifference > 0) { - timeSince = hourDifference + " hours ago" - } else if (minuteDifference > 0) { - timeSince = minuteDifference + " minutes ago" - } else { - timeSince = "Less than a minute ago" - } +// let hourDifference = parseInt(currentTime.split(':')[0]) - parseInt(notificationTime.split(':')[0]) +// let minuteDifference = parseInt(currentTime.split(':')[1]) - parseInt(notificationTime.split(':')[1]) +// let timeSince: string; +// if (hourDifference > 0) { +// timeSince = hourDifference + " hours ago" +// } else if (minuteDifference > 0) { +// timeSince = minuteDifference + " minutes ago" +// } else { +// timeSince = "Less than a minute ago" +// } - info.push({'title': notification['notification'].title, 'message': notification['notification'].message, 'timeSince': timeSince, "imgSrc": imgSrc}) + info.push({'title': notification['notification'].title, 'message': notification['notification'].message, 'timeSince': 'timeSince', "imgSrc": imgSrc}) } return info