Skip to content
This repository has been archived by the owner on Aug 14, 2024. It is now read-only.

Commit

Permalink
fix:wallpaper keeps resetting #284 (#799)
Browse files Browse the repository at this point in the history
* fix:wallpaper keeps resetting #284

* fix: use default formatting
  • Loading branch information
andersonvalley authored Sep 27, 2023
1 parent 4343f39 commit 5195ebc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@ jobs:
node-version: 16
cache: npm



- run: |
npm ci
npm run crowdin upload
Expand Down
8 changes: 5 additions & 3 deletions src/reducers/wallpaper.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,13 @@ const wallReducer = (state = defState, action) => {
src = "";

if (isIndex) {
wps = action.payload;
src = walls[action.payload];
wps = localStorage.getItem("wps");
src = walls[wps] ? walls[wps] : walls[0];
} else {
const idx = walls.findIndex((item) => item === action.payload);
localStorage.setItem("wps", idx);
src = action.payload;
wps = walls.indexOf(action.payload);
wps = walls[idx];
}

return {
Expand Down

0 comments on commit 5195ebc

Please sign in to comment.