Skip to content

A fully open source & end-to-end encrypted note taking alternative to Evernote.

connect github issue dialog with settings

ammarahm-ed4d7f89de883a
diff --git a/apps/mobile/src/components/Github/issue.js b/apps/mobile/src/components/Github/issue.js
index 0ae720660..7516d8f6e 100644
--- a/apps/mobile/src/components/Github/issue.js
+++ b/apps/mobile/src/components/Github/issue.js
@@ -1,10 +1,14 @@
import React, {useRef} from 'react';
import {Text, TextInput, View} from 'react-native';
import {useTracked} from '../../provider';
+import { eSendEvent } from '../../services/EventManager';
+import { eCloseProgressDialog } from '../../utils/Events';
import {openLinkInBrowser} from '../../utils/functions';
import {SIZE} from '../../utils/SizeUtils';
+import { sleep } from '../../utils/TimeUtils';
import {Button} from '../Button';
import DialogHeader from '../Dialog/dialog-header';
+import { presentDialog } from '../Dialog/functions';
import Seperator from '../Seperator';
import Paragraph from '../Typography/Paragraph';
@@ -13,7 +17,21 @@ export const Issue = () => {
const colors = state.colors;
const value = useRef(null);
- onPress = async () => {};
+ onPress = async () => {
+
+ eSendEvent(eCloseProgressDialog);
+ await sleep(300);
+ presentDialog({
+ title:"Issue submitted",
+ paragraph:"The issue you submitted has been published on github",
+ positiveText:"View",
+ negativeText:"Done",
+ positivePress:async () => {
+
+ }
+ })
+
+ };
return (
<View
diff --git a/apps/mobile/src/views/Settings/index.js b/apps/mobile/src/views/Settings/index.js
index cf6a839b6..f0028252b 100644
--- a/apps/mobile/src/views/Settings/index.js
+++ b/apps/mobile/src/views/Settings/index.js
@@ -22,6 +22,7 @@ import DialogButtons from '../../components/Dialog/dialog-buttons';
import DialogContainer from '../../components/Dialog/dialog-container';
import DialogHeader from '../../components/Dialog/dialog-header';
import {presentDialog} from '../../components/Dialog/functions';
+import { Issue } from '../../components/Github/issue';
import {Header as TopHeader} from '../../components/Header/index';
import Input from '../../components/Input';
import {PressableButton} from '../../components/PressableButton';
@@ -189,9 +190,10 @@ export const Settings = ({navigation}) => {
{
name: `Report an issue`,
func: async () => {
- try {
- await Linking.openURL('https://github.com/streetwriters/notesnook');
- } catch (e) {}
+ presentSheet({
+ noIcon:true,
+ component:<Issue/>
+ });
},
desc: `Facing an issue? Report it on our Github`
},