   window.dispatchEvent event
 
 NOTIFY_DEFAULT_ICON = path.join(ROOT, 'assets', 'icons', 'icon.png')
+NOTIFY_NOTIFICATION_API = true
+if process.platform == 'win32'
+  release = os.release().split('.')
+  if (release[0] < 6) or (release[0] == 6 and release[1] <= 1)
+    NOTIFY_NOTIFICATION_API = false
 window.notify = (msg, options) ->
   # Notification config
   enabled = config.get('poi.notify.enabled', true)

path = require 'path-extra'
notifier = require 'node-notifier'
fs = require 'fs-extra'

# Environments
window.remote = require 'remote'

    icon = options.icon if options.icon
  # Send desktop notification
  return unless enabled
  if NOTIFY_NOTIFICATION_API
    new Notification title,
      icon: "file://#{icon}"
      body: msg
  else
    notifier.notify
      title: title
      icon: icon
      message: msg
      sound: false
  # Play notification sound
  #   According to MDN Notification API docs: https://developer.mozilla.org/en-US/docs/Web/API/Notification/Notification
  #   Parameter `sound` is not supported in any browser yet, so we play sound manually.
