Skip to content

Commit

Permalink
fix: 修复插件保存位置记住状态丢失问题
Browse files Browse the repository at this point in the history
  • Loading branch information
moshangqi committed Dec 8, 2023
1 parent 4933acf commit 95dbce3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/components/SelectSavePosition/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,12 +92,15 @@ function SelectSavePosition(props: ISelectSavePositionProps) {
(value: PositionType) => {
if (value === 'note') {
setSelectSaveItem(DefaultSavePosition);
if (rememberKey) {
backgroundBridge.storage.update(rememberKey, DefaultSavePosition);
}
} else {
books[0] && setSelectSaveItem(books[0]);
}
setPosition(value);
},
[books],
[books, rememberKey],
);

useEffect(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
width: 100%;
box-shadow: none;
line-height: 22px;
margin-bottom: 6px;
margin-top: 12px;

&:hover, &:focus {
border: none;
Expand Down

0 comments on commit 95dbce3

Please sign in to comment.