Don't show theme chooser on dev

This commit is contained in:
RMidhunSuresh 2022-04-25 17:49:16 +05:30
parent bb3368959f
commit c39f0d2efb
2 changed files with 5 additions and 3 deletions

View file

@ -77,7 +77,9 @@ export class SettingsViewModel extends ViewModel {
this.sentImageSizeLimit = await this.platform.settingsStorage.getInt("sentImageSizeLimit"); this.sentImageSizeLimit = await this.platform.settingsStorage.getInt("sentImageSizeLimit");
this.pushNotifications.supported = await this.platform.notificationService.supportsPush(); this.pushNotifications.supported = await this.platform.notificationService.supportsPush();
this.pushNotifications.enabled = await this._session.arePushNotificationsEnabled(); this.pushNotifications.enabled = await this._session.arePushNotificationsEnabled();
if (!import.meta.env.DEV) {
this._activeTheme = await this.platform.getActiveTheme(); this._activeTheme = await this.platform.getActiveTheme();
}
this.emitChange(""); this.emitChange("");
} }

View file

@ -98,7 +98,7 @@ export class SettingsView extends TemplateView {
t.h3("Preferences"), t.h3("Preferences"),
row(t, vm.i18n`Scale down images when sending`, this._imageCompressionRange(t, vm)), row(t, vm.i18n`Scale down images when sending`, this._imageCompressionRange(t, vm)),
t.map(vm => vm.activeTheme, (theme, t) => { t.map(vm => vm.activeTheme, (theme, t) => {
return row(t, vm.i18n`Use the following theme`, this._themeOptions(t, vm, theme)); return !import.meta.env.DEV? row(t, vm.i18n`Use the following theme`, this._themeOptions(t, vm, theme)): null;
}), }),
); );
settingNodes.push( settingNodes.push(