ui: fix bookmark refresh, fix userState used param for update
This commit is contained in:
parent
63d1b8ab49
commit
5312d27693
2 changed files with 7 additions and 14 deletions
|
|
@ -110,12 +110,6 @@ function SessionList() {
|
|||
}
|
||||
}, [statusData, siteId]);
|
||||
|
||||
// useEffect(() => {
|
||||
// if (siteId) {
|
||||
// void searchStore.fetchSessions();
|
||||
// }
|
||||
// }, [siteId]);
|
||||
|
||||
useEffect(() => {
|
||||
const id = setInterval(() => {
|
||||
if (!document.hidden) {
|
||||
|
|
@ -130,12 +124,6 @@ function SessionList() {
|
|||
const { scrollY } = searchStore;
|
||||
window.scrollTo(0, scrollY);
|
||||
|
||||
// if (total === 0 && !loading && !hasNoRecordings) {
|
||||
// setTimeout(() => {
|
||||
// void searchStore.fetchSessions();
|
||||
// }, 100);
|
||||
// }
|
||||
|
||||
return () => {
|
||||
searchStore.setScrollPosition(window.scrollY);
|
||||
};
|
||||
|
|
@ -205,7 +193,9 @@ function SessionList() {
|
|||
className="mt-4"
|
||||
icon="arrow-repeat"
|
||||
iconSize={20}
|
||||
onClick={() => searchStore.fetchSessions(true)}
|
||||
onClick={() => {
|
||||
void searchStore.fetchSessions(true, isBookmark);
|
||||
}}
|
||||
>
|
||||
Refresh
|
||||
</Button>
|
||||
|
|
|
|||
|
|
@ -496,7 +496,10 @@ class UserStore {
|
|||
try {
|
||||
await userService.updateClient(params);
|
||||
runInAction(() => {
|
||||
this.client = new Client({ ...this.client, ...params });
|
||||
Object.keys(params).forEach((key) => {
|
||||
this.client[key] = params[key];
|
||||
this.account[key] = params[key];
|
||||
})
|
||||
});
|
||||
} catch (error) {
|
||||
// TODO error handling
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue