Skip to content

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

fix toolips never show when exiting editor

ammarahm-ed80650f9d7020
diff --git a/apps/mobile/src/navigation/RootView.js b/apps/mobile/src/navigation/RootView.js
index b25743f6b..54a6e17ee 100644
--- a/apps/mobile/src/navigation/RootView.js
+++ b/apps/mobile/src/navigation/RootView.js
@@ -60,7 +60,9 @@ const onChangeTab = async obj => {
if (getNote()?.locked) {
eSendEvent(eClearEditor);
}
- useTooltip.present('sectionheader');
+ setTimeout(() => {
+ useTooltip.present('sectionheader');
+ }, 300);
eSendEvent('showTooltip');
editing.movedAway = true;
if (editing.currentlyEditing) {
diff --git a/apps/mobile/src/utils/useTooltip.ts b/apps/mobile/src/utils/useTooltip.ts
index 38976048a..a7c292ebb 100644
--- a/apps/mobile/src/utils/useTooltip.ts
+++ b/apps/mobile/src/utils/useTooltip.ts
@@ -50,10 +50,11 @@ const useTooltip = () => {
currentTargets.push(target.current._nativeTag);
timers[timers.length] = setTimeout(() => {
TipManager.markPopupUsed(popup.id);
+ console.log('tooltip showing', popup.text);
RNTooltips.Show(target.current, parent.current, {
text: popup.text,
tintColor: colors.night ? colors.nav : '#404040',
- corner: Platform.OS === 'ios' ? 5 : 80,
+ corner: Platform.OS === 'ios' ? 5 : 50,
textSize: 15,
position: positions[position],
duration: duration || 10000,