Closed morealaz closed 1 month ago
Hi, I have made a change to the code related to the issue you reported. I would appreciate it if you could test the next update (which will be released soon) and let me know the results.
Hi, I have made a change to the code related to the issue you reported. I would appreciate it if you could test the next update (which will be released soon) and let me know the results.
Hi, I built app with your new changes, but problem still remained and this time even clicking on tray icon does not show any menu.
I checked your changes and noticed a mistake and fixed it with this code:
const trayIconChanger = (status: string) => {
const nativeImageIcon = nativeImage.createFromPath(
getAssetPath(`img/status/${status}.png`)
);
if (process.platform === 'darwin') {
return nativeImageIcon.resize({ width: 16, height: 16 });
} else {
return nativeImageIcon;
}
};
but after building app again and testing it, problem still remains but this time tray menu showed again and got fixed.
I think problem is somewhere else in the code. probably where the tray icon going to be set after connecting.
I made another change. If you have the means to test it, please check it out. If any errors occur, they should naturally be logged during development.
I made another change. If you have the means to test it, please check it out.
I tested new changes and tray icon did not change again.
If any errors occur, they should naturally be logged during development.
That's the interesting part. This is the new log message which you added:
Failed to load trayIcon: /usr/lib/oblivion-desktop/assets/img/status/connected-undefined.png
I think the problem is that undefined
returned as connection status.
Don't worry about assets path. It is correct and working. I set it in Arch Linux Package which I use for installing Oblivion.
Thank you for the test you conducted. Based on the provided logs, the issue has been identified and resolved.
Hi @ircfspace thanks again for fixing this annoying bug. Now that we find the source of this bug, I think we can safely change back these lines of code which we previously thought was source of this bug:
const trayIconChanger = (status: string): any => {
connectionStatus = String(status);
const iconPath = getAssetPath(`img/status/${status}.png`);
const nativeImageIcon = nativeImage.createFromPath(iconPath);
if (!nativeImageIcon.isEmpty()) {
if (process.platform === 'darwin') {
return nativeImageIcon.resize({ width: 16, height: 16 });
} else {
return nativeImageIcon;
}
} else {
console.error(`Failed to load trayIcon: ${iconPath}`);
return null;
}
};
and return 16 pixels image for all platform not just Mac! I checked GNOME UI design guidelines and they also recommended 16 pixels size icons. I tested it on GNOME with changing these codes to return 16 pixels icons, and it worked without any problem. What is your thought on this matter?
Thank you, This has been considered for all OS (except Windows).
Attention | توجه
What Happened? | چه اتفاقی افتاده؟
After connecting successfully to WARP, system tray icon does not appear correctly, but before connection it is ok.
before connection![image](https://github.com/bepass-org/oblivion-desktop/assets/62504187/2f96bc21-3bdf-48ad-bac7-872c6453d034)
after connection![image](https://github.com/bepass-org/oblivion-desktop/assets/62504187/9be23480-faaf-4c4c-bb14-90a30221da8a)
Minimal Reproducible Example | چه پروسهای برای مشاهده این مشکل طی کردهاید؟
No response
Relevant log output | لاگ برنامه