fix(app): default theme setting to auto instead of dark
This commit is contained in:
@@ -30,6 +30,16 @@ describe("use-settings", () => {
|
||||
);
|
||||
});
|
||||
|
||||
it("defaults theme to auto when storage is empty", async () => {
|
||||
asyncStorageMock.getItem.mockResolvedValue(null);
|
||||
asyncStorageMock.setItem.mockResolvedValue();
|
||||
|
||||
const mod = await import("./use-settings");
|
||||
const result = await mod.loadSettingsFromStorage();
|
||||
|
||||
expect(result.theme).toBe("auto");
|
||||
});
|
||||
|
||||
it("loads persisted built-in daemon management state", async () => {
|
||||
asyncStorageMock.getItem.mockImplementation(async (key: string) => {
|
||||
if (key === "@paseo:app-settings") {
|
||||
|
||||
@@ -12,7 +12,7 @@ export interface AppSettings {
|
||||
}
|
||||
|
||||
export const DEFAULT_APP_SETTINGS: AppSettings = {
|
||||
theme: "dark",
|
||||
theme: "auto",
|
||||
manageBuiltInDaemon: true,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user