Skip to content

Commit

Permalink
tabs fix !??!?!??? what ? 😳
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanOUINA committed Mar 9, 2021
1 parent bcddf7f commit 8fa4c05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion modules/discord_desktop_core/core/app/mainScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -141,13 +141,19 @@ function getSanitizedProtocolPath(url_) {


const WEBAPP_PATH = settings.get('WEBAPP_PATH', `/app?_=${Date.now()}`);
const URL_TO_LOAD = `${WEBAPP_ENDPOINT}${WEBAPP_PATH}`;
let URL_TO_LOAD = `${WEBAPP_ENDPOINT}${WEBAPP_PATH}`;
if(WEBAPP_ENDPOINT.startsWith("file://")){
URL_TO_LOAD = `${WEBAPP_ENDPOINT}?path=${encodeURIComponent(WEBAPP_PATH)}`;
}
const MIN_WIDTH = settings.get('MIN_WIDTH', 940);
const MIN_HEIGHT = settings.get('MIN_HEIGHT', 500);
const DEFAULT_WIDTH = 1280;
const DEFAULT_HEIGHT = 720; // TODO: document this var's purpose

const MIN_VISIBLE_ON_SCREEN = 32;
/**
* @type {Electron.BrowserWindow}
*/
let mainWindow = null;
let mainWindowId = _Constants.DEFAULT_MAIN_WINDOW_ID;
let mainWindowInitialPath = null;
Expand Down Expand Up @@ -418,6 +424,9 @@ function launchMainAppWindow(isVisible) {
mainWindow.destroy();
}

/**
* @type {Electron.BrowserWindowConstructorOptions}
*/
const mainWindowOptions = {
title: 'Lightcord',
width: DEFAULT_WIDTH,
Expand Down Expand Up @@ -462,6 +471,7 @@ function launchMainAppWindow(isVisible) {
mainWindow = new BrowserWindow(mainWindowOptions);
mainWindowId = mainWindow.id;
global.mainWindowId = mainWindowId;
mainWindow.webContents.openDevTools()

if(useGlasstron)setDefaultBlur()

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lightcord",
"version": "0.1.4",
"version": "0.1.5",
"description": "A simple - customizable - Discord Client.",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit 8fa4c05

Please sign in to comment.