removed unnecessary comments after review

pull/905/head
Brian Jian Zhao 6 years ago
parent b877dab7de
commit 23da1831c2

@ -323,16 +323,7 @@
const ttl = Number.isNaN(intValue) ? 24 : intValue; const ttl = Number.isNaN(intValue) ? 24 : intValue;
storage.put('message-ttl', ttl); storage.put('message-ttl', ttl);
}, },
// getZoomFactor: () => storage.get('zoom-factor-setting', 48),
// setZoomFactor: value => {
// // Make sure the ttl is between a given range and is valid
// const intValue = parseInt(value, 10);
// const factor = Number.isNaN(intValue) ? 24 : intValue;
// storage.put('zoom-factor-setting', factor);
// },
getReadReceiptSetting: () => storage.get('read-receipt-setting'), getReadReceiptSetting: () => storage.get('read-receipt-setting'),
setReadReceiptSetting: value => setReadReceiptSetting: value =>
storage.put('read-receipt-setting', value), storage.put('read-receipt-setting', value),

@ -577,7 +577,6 @@ let settingsWindow;
async function showSettingsWindow() { async function showSettingsWindow() {
if (settingsWindow) { if (settingsWindow) {
settingsWindow.show(); settingsWindow.show();
console.log(window.getSettingValue('zoom-factor-setting'), 'from settingsWindow')
return; return;
} }
if (!mainWindow) { if (!mainWindow) {

@ -2,6 +2,7 @@
/* global window: false */ /* global window: false */
const path = require('path'); const path = require('path');
const electron = require('electron'); const electron = require('electron');
const {webFrame} = electron; const {webFrame} = electron;
const semver = require('semver'); const semver = require('semver');
@ -251,11 +252,6 @@ window.getMessageTTL = () => window.storage.get('message-ttl', 24);
installGetter('message-ttl', 'getMessageTTL'); installGetter('message-ttl', 'getMessageTTL');
installSetter('message-ttl', 'setMessageTTL'); installSetter('message-ttl', 'setMessageTTL');
// Get the zoom Factor setting
// window.getZoomFactor = () => window.storage.get('zoom-factor-setting',50)
// installGetter('zoom-factor-setting', 'getZoomFactor');
// installSetter('zoom-factor-setting', 'setZoomFactor');
installGetter('read-receipt-setting', 'getReadReceiptSetting'); installGetter('read-receipt-setting', 'getReadReceiptSetting');
installSetter('read-receipt-setting', 'setReadReceiptSetting'); installSetter('read-receipt-setting', 'setReadReceiptSetting');

@ -34,7 +34,6 @@ export class SessionToggle extends React.PureComponent<Props, State> {
this.state = { this.state = {
active: active, active: active,
}; };
console.log('it is the constructor runs the first')
} }
@ -42,9 +41,6 @@ export class SessionToggle extends React.PureComponent<Props, State> {
public render() { public render() {
console.log(this.props, 'from Session Toggle')
return ( return (
<div <div
className={classNames( className={classNames(
@ -71,11 +67,6 @@ export class SessionToggle extends React.PureComponent<Props, State> {
} }
}; };
//what does the following piece of code do? //
//what is the window.comfirmationDialog doing in here?
if ( if (
this.props.confirmationDialogParams && this.props.confirmationDialogParams &&
this.props.confirmationDialogParams.shouldShowConfirm() this.props.confirmationDialogParams.shouldShowConfirm()

@ -145,8 +145,6 @@ export class SessionSettingListItem extends React.Component<Props, State> {
sliderValue: value, sliderValue: value,
}); });
console.log(this.props.title, 'from here')
if(this.props.title === 'Zoom Factor' && this.state.sliderValue!==null) { if(this.props.title === 'Zoom Factor' && this.state.sliderValue!==null) {
window.setZoomFactor(this.state.sliderValue/100) window.setZoomFactor(this.state.sliderValue/100)
} }

@ -137,10 +137,6 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
this.updateSetting(setting); this.updateSetting(setting);
}); });
//define a bunch of function that will be used in the setting list.
//since setting elem itself is an array elem, this either becomes, onlick function
// or a function returned by others.
return ( return (
<div key={setting.id}> <div key={setting.id}>
{shouldRenderSettings && {shouldRenderSettings &&
@ -238,11 +234,8 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
this.state.shouldLockSettings && this.state.hasPassword; this.state.shouldLockSettings && this.state.hasPassword;
return ( return (
//this is the section where the actually setting group of components gets render!
<div className="session-settings"> <div className="session-settings">
{/* header is always rendered */}
<SettingsHeader <SettingsHeader
showLinkDeviceButton={!shouldRenderPasswordLock} showLinkDeviceButton={!shouldRenderPasswordLock}
category={category} category={category}
@ -251,7 +244,6 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
<div className="session-settings-view"> <div className="session-settings-view">
{/* some show lock logic is put in here to make sure that every time if you want to change the appearance */}
{shouldRenderPasswordLock ? ( {shouldRenderPasswordLock ? (
this.renderPasswordLock() this.renderPasswordLock()
// //

Loading…
Cancel
Save