mirror of
				https://github.com/Mastermindzh/tidal-hifi.git
				synced 2025-11-04 02:39:13 +01:00 
			
		
		
		
	added the option to disable the system tray icon and fixed the settings menu
This commit is contained in:
		@@ -14,6 +14,7 @@ const store = new Store({
 | 
			
		||||
    apiSettings: {
 | 
			
		||||
      port: 47836,
 | 
			
		||||
    },
 | 
			
		||||
    trayIcon: true,
 | 
			
		||||
    mpris: false,
 | 
			
		||||
    windowBounds: { width: 800, height: 600 },
 | 
			
		||||
  },
 | 
			
		||||
 
 | 
			
		||||
@@ -3,12 +3,15 @@ const { getMenu } = require("./menu");
 | 
			
		||||
const trayModule = {};
 | 
			
		||||
let tray;
 | 
			
		||||
 | 
			
		||||
trayModule.addTray = function(options = { icon: "" }) {
 | 
			
		||||
trayModule.addTray = function (options = { icon: "" }) {
 | 
			
		||||
  tray = new Tray(options.icon);
 | 
			
		||||
};
 | 
			
		||||
 | 
			
		||||
trayModule.refreshTray = function() {
 | 
			
		||||
  tray.on("click", function(e) {
 | 
			
		||||
trayModule.refreshTray = function () {
 | 
			
		||||
  if (!tray) {
 | 
			
		||||
    trayModule.addTray();
 | 
			
		||||
  }
 | 
			
		||||
  tray.on("click", function (e) {
 | 
			
		||||
    // do nothing on click
 | 
			
		||||
  });
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user