mirror of
https://github.com/th-ch/youtube-music.git
synced 2026-01-11 10:31:47 +00:00
fix: Added Min height and width to the window which doesnt breaks the UI responsiveness (#3602)
This commit is contained in:
@ -353,6 +353,8 @@ async function createMainWindow() {
|
||||
icon,
|
||||
width: windowSize.width,
|
||||
height: windowSize.height,
|
||||
minWidth: 325,
|
||||
minHeight: 425,
|
||||
backgroundColor: '#000',
|
||||
show: false,
|
||||
webPreferences: {
|
||||
@ -949,8 +951,7 @@ function removeContentSecurityPolicy(
|
||||
betterSession.webRequest.setResolver(
|
||||
'onHeadersReceived',
|
||||
async (listeners) => {
|
||||
return listeners.reduce(
|
||||
async (accumulator, listener) => {
|
||||
return listeners.reduce(async (accumulator, listener) => {
|
||||
const acc = await accumulator;
|
||||
if (acc.cancel) {
|
||||
return acc;
|
||||
@ -958,9 +959,7 @@ function removeContentSecurityPolicy(
|
||||
|
||||
const result = await listener.apply();
|
||||
return { ...accumulator, ...result };
|
||||
},
|
||||
Promise.resolve({ cancel: false }),
|
||||
);
|
||||
}, Promise.resolve({ cancel: false }));
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user