removed unnecessary comments after review

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

@ -323,16 +323,7 @@
const ttl = Number.isNaN(intValue) ? 24 : intValue;
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'),
setReadReceiptSetting: value =>
storage.put('read-receipt-setting', value),

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

@ -2,6 +2,7 @@
/* global window: false */
const path = require('path');
const electron = require('electron');
const {webFrame} = electron;
const semver = require('semver');
@ -251,11 +252,6 @@ window.getMessageTTL = () => window.storage.get('message-ttl', 24);
installGetter('message-ttl', 'getMessageTTL');
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');
installSetter('read-receipt-setting', 'setReadReceiptSetting');

@ -34,7 +34,6 @@ export class SessionToggle extends React.PureComponent<Props, State> {
this.state = {
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() {
console.log(this.props, 'from Session Toggle')
return (
<div
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 (
this.props.confirmationDialogParams &&
this.props.confirmationDialogParams.shouldShowConfirm()

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

@ -137,10 +137,6 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
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 (
<div key={setting.id}>
{shouldRenderSettings &&
@ -238,11 +234,8 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
this.state.shouldLockSettings && this.state.hasPassword;
return (
//this is the section where the actually setting group of components gets render!
<div className="session-settings">
{/* header is always rendered */}
<SettingsHeader
showLinkDeviceButton={!shouldRenderPasswordLock}
category={category}
@ -251,7 +244,6 @@ export class SettingsView extends React.Component<SettingsViewProps, State> {
<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 ? (
this.renderPasswordLock()
//

Loading…
Cancel
Save