Skip to content

Commit

Permalink
cleanup version selector
Browse files Browse the repository at this point in the history
  • Loading branch information
AmyrAhmady committed Jan 28, 2024
1 parent 665eaa2 commit 8b0075d
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions src/containers/JoinServerPrompt/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,16 @@ import StaticModal from "../../components/StaticModal";
import Text from "../../components/Text";
import { images } from "../../constants/images";
import { useJoinServerPrompt } from "../../states/joinServerPrompt";
import { usePersistentServers } from "../../states/servers";
import { useSettings } from "../../states/settings";
import { useTheme } from "../../states/theme";
import {
checkResourceFilesAvailability,
copySharedFilesIntoGameFolder,
startGame,
} from "../../utils/game";
import { startGame } from "../../utils/game";
import {
getSampVersionFromName,
getSampVersionName,
getSampVersions,
} from "../../utils/helpers";
import { Log } from "../../utils/logger";
import { sc } from "../../utils/sizeScaler";
import { usePersistentServers } from "../../states/servers";
import { SAMPDLLVersions } from "../../utils/types";

const JoinServerPrompt = () => {
Expand Down Expand Up @@ -245,15 +240,6 @@ const JoinServerPrompt = () => {
onChange={async (value) => {
const version = getSampVersionFromName(value);
setSampVersion(version);
if (version !== "custom") {
const checks = await checkResourceFilesAvailability();
if (checks.includes(false)) {
Log.debug(
"Failed file validation, let's copy files into GTASA directory"
);
await copySharedFilesIntoGameFolder();
}
}
}}
/>
</View>
Expand Down

0 comments on commit 8b0075d

Please sign in to comment.