wildfirechat / vue-pc-chat

野火IM PC 客户端,支持Windows、MacOS,Linux,支持国产操作系统和国产CPU
Other
134 stars 125 forks source link

Windows new message blink icon background. #172

Closed Muzummil closed 2 years ago

Muzummil commented 2 years ago

Our goal is to show background of windows icon in taskbar something like below. image We have a function "execBlink" in background.js file and we want to trigger it manually i.e when we receive a new message in store or proto file. Is there any way to achieve this? We have tried with ipcMain and ipcRenderer but not receiving the call back in background.js file. Putting the logic in store is not a valid way so is there other way to achieve this in accordance to existing structure of the application?

imndx commented 2 years ago

请参考下面这个方法的调用逻辑,通过update-badge事件,最终会触发execBlink https://github.com/wildfirechat/vue-pc-chat/blob/06dacc1d7ffcafd43cb3d9e80d8e09a0ca684716/src/store.js#L1619-L1637

Muzummil commented 2 years ago

I did exactly the same but it is not triggering the callback, thanks for the response.