weweChat icon indicating copy to clipboard operation
weweChat copied to clipboard

win10 当有消息来时右下角图标不会闪烁, 也不会有任何提醒

Open gclsoft opened this issue 5 years ago • 6 comments

为什么我几台电脑试了都不能弹出消息提示框, 也没有闪烁, win10系统, 谢谢! image

                if (!helper.isMuted(user)
                    && !sync
                    && settings.showNotification) {
                    let notification = new window.Notification(title, {
                        icon: user.HeadImgUrl,
                        body: helper.getMessageContent(message),
                        vibrate: [200, 100, 200],
                    });

                    notification.onclick = () => {
                        ipcRenderer.send('show-window');
                    };
                }

gclsoft avatar Aug 13 '18 08:08 gclsoft

  1. 其他端同步过来的消息,用户被设置为静音,设置中关闭了消息提示,这3种情况不会提示
  2. 图标栏是不会有闪烁的

trazyn avatar Aug 13 '18 08:08 trazyn

万分感谢, 我设置中是开了消息提示的. 如果想支持闪烁, 要怎么加呢?

gclsoft avatar Aug 13 '18 08:08 gclsoft

把图标换成gif也许能满足你的需求吧

trazyn avatar Aug 13 '18 08:08 trazyn

                  let notification = new window.Notification(title, {
                       icon: user.HeadImgUrl,
                       body: helper.getMessageContent(message),
                       vibrate: [200, 100, 200],
                   });

@trazyn 我调试了,代码是都执行了,但右下角就是一直很安静地不变 image

gclsoft avatar Aug 13 '18 08:08 gclsoft

是有一点点变化,多了...肉眼看不出来, 我测试发送的微信头像是有颜色的啊, 怎么变显眼一点呢? image image

gclsoft avatar Aug 13 '18 08:08 gclsoft

可以自己替换掉对应 tray icon Mac 的消息提示在右上角,win10不知

screen shot 2018-08-13 at 4 45 01 pm

trazyn avatar Aug 13 '18 08:08 trazyn