mirror of
https://github.com/antebudimir/feishin.git
synced 2026-01-01 10:23:33 +00:00
[feat]: actually include version checks
This commit is contained in:
commit
dae2f9bd0a
36 changed files with 224 additions and 222 deletions
|
|
@ -3,6 +3,7 @@ import { useAuthStoreActions, useCurrentServer } from '/@/renderer/store';
|
|||
import { useQuery } from '@tanstack/react-query';
|
||||
import { queryKeys } from '/@/renderer/api/query-keys';
|
||||
import { controller } from '/@/renderer/api/controller';
|
||||
import isEqual from 'lodash/isEqual';
|
||||
|
||||
export const useServerVersion = () => {
|
||||
const { updateServer } = useAuthStoreActions();
|
||||
|
|
@ -24,7 +25,7 @@ export const useServerVersion = () => {
|
|||
useEffect(() => {
|
||||
if (server && server.id === serverInfo.data?.id) {
|
||||
const { version, features } = serverInfo.data;
|
||||
if (version !== server.version) {
|
||||
if (version !== server.version || !isEqual(features, server.features)) {
|
||||
updateServer(server.id, {
|
||||
features,
|
||||
version,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue