Skip to content

Commit

Permalink
feat: update server status when expand server list to prevent stale v…
Browse files Browse the repository at this point in the history
…alue
  • Loading branch information
linonetwo committed Sep 12, 2023
1 parent fded738 commit 924ae5a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/pages/Importer/Index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import { Button, MD3Colors, ProgressBar, Text, TextInput } from 'react-native-pa
import { styled } from 'styled-components/native';
import { RootStackParameterList } from '../../App';
import { ServerList } from '../../components/ServerList';
import { backgroundSyncService } from '../../services/BackgroundSyncService';
import { nativeService } from '../../services/NativeService';
import { useServerStore } from '../../store/server';
import { useImportHTML } from './useImportHTML';
Expand Down Expand Up @@ -134,6 +135,7 @@ export const Importer: FC<StackScreenProps<RootStackParameterList, 'Importer'>>
mode='text'
disabled={importStatus !== 'idle'}
onPress={() => {
void backgroundSyncService.updateServerOnlineStatus();
setExpandServerList(!expandServerList);
}}
>
Expand Down
1 change: 1 addition & 0 deletions src/pages/MainMenu/EditItemModel/WikiModelContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ export function WikiEditModalContent({ id, onClose }: WikiEditModalProps): JSX.E
<Button
mode='text'
onPress={() => {
void backgroundSyncService.updateServerOnlineStatus();
setExpandServerList(!expandServerList);
}}
>
Expand Down

0 comments on commit 924ae5a

Please sign in to comment.