mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
fix editor flickering when note is opened in dark mode
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -722,7 +722,7 @@ table[style*='border-width: 0px'] th {
|
||||
content: '-';
|
||||
}
|
||||
body {
|
||||
background-color: #1f1f1f;
|
||||
background-color: transparent;
|
||||
color: #d3d3d3;
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
|
||||
Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -47,8 +47,15 @@ function init_tiny(size) {
|
||||
max-width:100% !important;
|
||||
height:auto !important;
|
||||
}
|
||||
.tox .tox-edit-area__iframe {
|
||||
background-color:transparent !important;
|
||||
}
|
||||
body {
|
||||
background-color:transparent !important;
|
||||
}
|
||||
iframe {
|
||||
max-width:100% !important;
|
||||
background-color:transparent !important;
|
||||
}
|
||||
table {
|
||||
display: block !important;
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -47,8 +47,16 @@ function init_tiny(size) {
|
||||
max-width:100% !important;
|
||||
height:auto !important;
|
||||
}
|
||||
|
||||
.tox .tox-edit-area__iframe {
|
||||
background-color:transparent !important;
|
||||
}
|
||||
body {
|
||||
background-color:transparent !important;
|
||||
}
|
||||
iframe {
|
||||
max-width:100% !important;
|
||||
background-color:transparent !important;
|
||||
}
|
||||
table {
|
||||
display: block !important;
|
||||
|
||||
@@ -1134,8 +1134,8 @@
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CODE_SIGN_ENTITLEMENTS = Notesnook/Notesnook.entitlements;
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
CURRENT_PROJECT_VERSION = 1372;
|
||||
DEVELOPMENT_TEAM = 53CWBG3QUC;
|
||||
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
|
||||
@@ -1215,7 +1215,7 @@
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook;
|
||||
PRODUCT_NAME = Notesnook;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "Notesnook iOS Distribution";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Notesnook-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
@@ -1463,8 +1463,8 @@
|
||||
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES;
|
||||
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
|
||||
CODE_SIGN_ENTITLEMENTS = "Make Note/Make Note.entitlements";
|
||||
CODE_SIGN_IDENTITY = "Apple Development";
|
||||
CODE_SIGN_STYLE = Automatic;
|
||||
CODE_SIGN_IDENTITY = "iPhone Distribution";
|
||||
CODE_SIGN_STYLE = Manual;
|
||||
COPY_PHASE_STRIP = NO;
|
||||
CURRENT_PROJECT_VERSION = 1372;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
@@ -1543,7 +1543,7 @@
|
||||
MTL_FAST_MATH = YES;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = org.streetwriters.notesnook.share;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
PROVISIONING_PROFILE_SPECIFIER = "Notesnook Extension iOS Distribution 2";
|
||||
SKIP_INSTALL = YES;
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Make Note/Make Note-Bridging-Header.h";
|
||||
SWIFT_VERSION = 5.0;
|
||||
|
||||
@@ -263,7 +263,7 @@ PODS:
|
||||
- React
|
||||
- react-native-viewpager (4.2.2):
|
||||
- React-Core
|
||||
- react-native-webview (11.0.2):
|
||||
- react-native-webview (11.4.0):
|
||||
- React-Core
|
||||
- React-perflogger (0.64.0)
|
||||
- React-RCTActionSheet (0.64.0):
|
||||
@@ -349,7 +349,7 @@ PODS:
|
||||
- React-Core
|
||||
- RNGestureHandler (1.9.0):
|
||||
- React-Core
|
||||
- RNIap (5.2.0):
|
||||
- RNIap (5.2.14):
|
||||
- React-Core
|
||||
- RNInAppBrowser (3.5.1):
|
||||
- React-Core
|
||||
@@ -361,7 +361,7 @@ PODS:
|
||||
- React-Core
|
||||
- RNReanimated (1.13.2):
|
||||
- React-Core
|
||||
- RNScreens (2.16.1):
|
||||
- RNScreens (2.18.1):
|
||||
- React-Core
|
||||
- RNSecureRandom (1.0.0):
|
||||
- React
|
||||
@@ -652,7 +652,7 @@ SPEC CHECKSUMS:
|
||||
react-native-sodium: c7587732667e1cdb7d0d77c2aa2e98420aad2036
|
||||
react-native-splash-screen: 200d11d188e2e78cea3ad319964f6142b6384865
|
||||
react-native-viewpager: ea945e2881ce9a4a8bcdc84de4ec65ff23c90f6e
|
||||
react-native-webview: dfd7202ff115c44d3ea401c2f36122fb3ac79f07
|
||||
react-native-webview: 4dfb534e9600b87fe667c5ca4fe09149383218b9
|
||||
React-perflogger: 9c547d8f06b9bf00cb447f2b75e8d7f19b7e02af
|
||||
React-RCTActionSheet: 3080b6e12e0e1a5b313c8c0050699b5c794a1b11
|
||||
React-RCTAnimation: 3f96f21a497ae7dabf4d2f150ee43f906aaf516f
|
||||
@@ -674,13 +674,13 @@ SPEC CHECKSUMS:
|
||||
RNFastImage: d4870d58f5936111c56218dbd7fcfc18e65b58ff
|
||||
RNFileViewer: 83cc066ad795b1f986791d03b56fe0ee14b6a69f
|
||||
RNGestureHandler: 9b7e605a741412e20e13c512738a31bd1611759b
|
||||
RNIap: 64d7d32ba6edde36921858399433c9ca0a5245e6
|
||||
RNIap: f00befe6581a5953191108cb97d9b3872473337b
|
||||
RNInAppBrowser: 48b95ba7a4eaff5cc223bca338d3e319561dbd1b
|
||||
RNKeychain: 840f8e6f13be0576202aefcdffd26a4f54bfe7b5
|
||||
RNPermissions: 99dd8d4a30ff13509b949ca63cd1f69edc461775
|
||||
RNPrivacySnapshot: 8eaf571478a353f2e5184f5c803164f22428b023
|
||||
RNReanimated: e03f7425cb7a38dcf1b644d680d1bfc91c3337ad
|
||||
RNScreens: 45c457af3d2ee9e08fc01e70da87e653d46b1198
|
||||
RNScreens: f7ad633b2e0190b77b6a7aab7f914fad6f198d8d
|
||||
RNSecureRandom: 0dcee021fdb3d50cd5cee5db0ebf583c42f5af0e
|
||||
RNShare: 7e22ba3bf66294ff7c122a1f2da8a8ec642091a0
|
||||
RNSVG: ce9d996113475209013317e48b05c21ee988d42e
|
||||
|
||||
@@ -16,9 +16,9 @@ export const db = new Database(
|
||||
*/
|
||||
|
||||
db.host( __DEV__ ? {
|
||||
API_HOST: 'http://192.168.10.3:5264',
|
||||
AUTH_HOST: 'http://192.168.10.3:8264',
|
||||
SSE_HOST: 'http://192.168.10.3:7264',
|
||||
API_HOST: 'https://api.notesnook.com',
|
||||
AUTH_HOST: 'https://auth.streetwriters.co',
|
||||
SSE_HOST: 'https://events.streetwriters.co',
|
||||
} : {
|
||||
API_HOST: 'https://api.notesnook.com',
|
||||
AUTH_HOST: 'https://auth.streetwriters.co',
|
||||
|
||||
@@ -20,26 +20,31 @@ const EditorOverlay = () => {
|
||||
const {colors} = state;
|
||||
const [loading, setLoading] = useState(null);
|
||||
const [error, setError] = useState(false);
|
||||
const [progress, setProgress] = useState(0);
|
||||
const opacity = useValue(1);
|
||||
const translateY = useValue(6000);
|
||||
|
||||
const load = async (_loading) => {
|
||||
const load = async _loading => {
|
||||
clearTimeout(timer);
|
||||
clearTimeout(timerError);
|
||||
setProgress(2);
|
||||
setLoading(_loading);
|
||||
if (_loading) {
|
||||
opacity.setValue(1);
|
||||
setLoading(_loading);
|
||||
timerError = setTimeout(() => {
|
||||
setError(true);
|
||||
}, 4000);
|
||||
} else {
|
||||
setProgress(4);
|
||||
setError(false);
|
||||
setProgress(1);
|
||||
opacity.setValue(1);
|
||||
setLoading(null);
|
||||
clearTimeout(timer);
|
||||
clearTimeout(timerError);
|
||||
setError(false);
|
||||
timing(opacity, {
|
||||
toValue: 0,
|
||||
duration: 150,
|
||||
easing: Easing.in(Easing.ease),
|
||||
}).start();
|
||||
setTimeout(() => {
|
||||
opacity.setValue(1);
|
||||
setLoading(null);
|
||||
}, 150);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -48,7 +53,7 @@ const EditorOverlay = () => {
|
||||
return () => {
|
||||
eUnSubscribeEvent('loadingNote', load);
|
||||
};
|
||||
}, []);
|
||||
}, [loading]);
|
||||
|
||||
return (
|
||||
<Animated.View
|
||||
@@ -60,7 +65,11 @@ const EditorOverlay = () => {
|
||||
justifyContent: 'center',
|
||||
alignItems: 'center',
|
||||
opacity: opacity,
|
||||
top: loading ? 0 : 6000,
|
||||
transform: [
|
||||
{
|
||||
translateY:loading? 0 : 6000,
|
||||
},
|
||||
],
|
||||
zIndex: 100,
|
||||
}}>
|
||||
<View
|
||||
@@ -122,7 +131,6 @@ const EditorOverlay = () => {
|
||||
marginTop: 10,
|
||||
}}
|
||||
onPress={() => {
|
||||
setProgress(0);
|
||||
setError(false);
|
||||
eSendEvent('webviewreset');
|
||||
}}
|
||||
|
||||
@@ -202,23 +202,18 @@ export const loadNote = async item => {
|
||||
return;
|
||||
}
|
||||
await setNote(item);
|
||||
clearTimer();
|
||||
eSendEvent('loadingNote', item);
|
||||
webviewInit = false;
|
||||
editing.isFocused = false;
|
||||
eSendEvent('webviewreset');
|
||||
InteractionManager.runAfterInteractions(async () => {
|
||||
eSendEvent('webviewreset');
|
||||
webviewInit = false;
|
||||
editing.isFocused = false;
|
||||
clearTimer();
|
||||
sendNoteEditedEvent({
|
||||
id: id,
|
||||
});
|
||||
if (webviewInit) {
|
||||
await loadNoteInEditor();
|
||||
} else {
|
||||
EditorWebView.current?.reload();
|
||||
}
|
||||
updateEvent({type: Actions.CURRENT_EDITING_NOTE, id: item.id});
|
||||
checkStatus();
|
||||
}, 1);
|
||||
}, 50);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user