Added the ability to opt out of the integrated wallpaper service. (#109)

This commit is contained in:
Jas Singh
2024-08-11 01:15:06 -07:00
committed by GitHub
parent 0d7bd7dbc2
commit 1eef504fc2
8 changed files with 41 additions and 4 deletions

View File

@@ -5,6 +5,7 @@ import { RowProps } from "lib/types/options"
import { Variable } from "types/variable";
import Wallpaper from "services/Wallpaper";
import { dependencies as checkDependencies } from "lib/utils";
import options from "options";
const EnumSetter = (opt: Opt<string>, values: string[]) => {
const lbl = Widget.Label({ label: opt.bind().as(v => `${v}`) })
@@ -159,7 +160,9 @@ export const Inputter = <T>({
case "wallpaper": return self.child = Widget.FileChooserButton({
on_file_set: ({ uri }) => {
opt.value = uri!.replace("file://", "") as T;
Wallpaper.set(uri!.replace("file://", ""));
if (options.wallpaper.enable.value) {
Wallpaper.set(uri!.replace("file://", ""));
}
},
})