Fix issue with selecting decks

also remove alert on start
This commit is contained in:
horhik 2020-05-10 12:55:54 +03:00
parent a3d67dfefb
commit e634dfee2a
2 changed files with 2 additions and 2 deletions

View file

@ -58,7 +58,7 @@ export const addNote = async words => {
const ankiData = await getAnkiData(); const ankiData = await getAnkiData();
await console.log(ankiData); await console.log(ankiData);
const template = await ankiData.fieldList; const template = await ankiData.fieldList;
const deckId = store.getState().anki.selectedDeck.id; const deckId = store.getState().anki.selectedDeck.deck.id;
const modelId = await ankiData.modelId; const modelId = await ankiData.modelId;
console.log(template, deckId, modelId); console.log(template, deckId, modelId);
const settings = { const settings = {

View file

@ -23,7 +23,7 @@ const StartScreen = props => {
props.getSavedData(); props.getSavedData();
props.checkAnkiLanModelForExisting(props.modelName, props.modelList); props.checkAnkiLanModelForExisting(props.modelName, props.modelList);
} else { } else {
alert('Troubles'); console.log('Troubles with permissions');
props.requestAnkiPermission(); props.requestAnkiPermission();
} }
}, []); }, []);