Skip to content

Commit

Permalink
disable native toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouhua committed Jul 15, 2024
1 parent df7a65e commit 2a50d99
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/Plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,20 @@ class PopkitSetting extends PluginSettingTab {
this.root.unmount();
}
containerEl.empty();
new Setting(containerEl)
.setName(L.setting.disableNativeToolbar())
.addToggle(toggle => {
toggle
.setValue(this.plugin.settings.disableNativeToolbar)
.onChange(value => {
this.update({
...this.plugin.settings,
disableNativeToolbar: value,
if (Platform.isMobile) {
new Setting(containerEl)
.setName(L.setting.disableNativeToolbar())
.addToggle(toggle => {
toggle
.setValue(this.plugin.settings.disableNativeToolbar)
.onChange(value => {
this.update({
...this.plugin.settings,
disableNativeToolbar: value,
});
});
});
});
});
}
const rootEl = containerEl.createDiv();
this.root = renderSetting(
rootEl,
Expand Down

0 comments on commit 2a50d99

Please sign in to comment.