a bit of cleanup, better naming of the app cache

This commit is contained in:
or-else
2021-05-08 18:01:14 -07:00
parent 62259ab331
commit aa8d60cc1d
14 changed files with 428 additions and 418 deletions
+6 -7
View File
@@ -36,16 +36,15 @@ export default class SettingsView extends React.PureComponent {
render() {
const names = {def: "default", ws: "websocket", lp: "long polling"};
var transportOptions = [];
var instance = this;
['def', 'ws', 'lp'].map(function(item) {
var id = 'transport-' + item;
var name = names[item];
const transportOptions = [];
['def', 'ws', 'lp'].map((item) => {
const id = 'transport-' + item;
const name = names[item];
transportOptions.push(
<li key={item}>
<input type="radio" id={id} name="transport-select" value={item}
checked={instance.state.transport === item}
onChange={instance.handleTransportSelected} />
checked={this.state.transport === item}
onChange={this.handleTransportSelected} />
<label htmlFor={id}>{name}</label>
</li>
);
+2 -2
View File
@@ -324,8 +324,8 @@ class TinodeWeb extends React.Component {
this.checkForAppUpdate(reg);
this.fbPush.useServiceWorker(reg);
reg.active.postMessage(JSON.stringify({locale: locale, version: PACKAGE_VERSION}));
// Google could not be bothered to mention that
// onTokenRefresh is never called.
// Google could not be bothered to mention that onTokenRefresh is never called.
this.fbPush.onTokenRefresh(() => {
this.requestPushToken();
});