Skip to content

Commit

Permalink
disparition magique de clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
Filigram committed Dec 23, 2024
1 parent c1b6440 commit 9663888
Showing 1 changed file with 0 additions and 26 deletions.
26 changes: 0 additions & 26 deletions src/views/settings/SettingsSubjects.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import { COLORS_LIST } from "@/services/shared/Subject";
import type { Screen } from "@/router/helpers/types";
import SubjectContainerCard from "@/components/Settings/SubjectContainerCard";
import { set } from "lodash";
import * as Clipboard from "expo-clipboard";
import * as FileSystem from "expo-file-system";
import * as DocumentPicker from "expo-document-picker";

Expand Down Expand Up @@ -163,16 +162,6 @@ const SettingsSubjects: Screen<"SettingsSubjects"> = ({ navigation }) => {
"Exporter les couleurs actuelles ?",
[
{ text: "Annuler", style: "cancel" },
{
text: "Presse papier",
style: "destructive",
onPress: () => {
const writeToClipboard = async (text: string) => {
await Clipboard.setStringAsync(text);
};
writeToClipboard(JSON.stringify(subjectsForCopy));
}
},
{
text: "Fichier",
style: "destructive",
Expand Down Expand Up @@ -221,21 +210,6 @@ const SettingsSubjects: Screen<"SettingsSubjects"> = ({ navigation }) => {
"Importer une table de couleurs depuis le presse papier ?",
[
{ text: "Annuler", style: "cancel" },
{
text: "Presse papier",
style: "destructive",
onPress: () => {
const getClipboard = async () => {
const result = await Clipboard.getStringAsync();
if (isJsonable(result)) {
setSubjectsFromJson(JSON.parse(result));
} else {
Alert.alert("Erreur", "Vérifiez le contenu de la presse papier puis réessayez.");
}
};
getClipboard();
}
},
{
text: "Fichier",
style: "destructive",
Expand Down

0 comments on commit 9663888

Please sign in to comment.