mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-25 07:59:48 +01:00
fix issues related to alias changes
This commit is contained in:
@@ -231,7 +231,7 @@ function init_tiny(size) {
|
||||
},
|
||||
image_description: false,
|
||||
image_caption: false,
|
||||
media_dimensions:false,
|
||||
media_dimensions: false,
|
||||
font_formats:
|
||||
'Times New Roman=times new roman,times;' +
|
||||
'Serif=serif;' +
|
||||
@@ -278,7 +278,7 @@ function init_tiny(size) {
|
||||
|
||||
editor.ui.registry.addContextToolbar('iframecontrols', {
|
||||
predicate: function (node) {
|
||||
return node.getAttribute("data-mce-object") === "iframe"
|
||||
return node.getAttribute('data-mce-object') === 'iframe';
|
||||
},
|
||||
items: 'deletevideo',
|
||||
position: 'node',
|
||||
@@ -343,6 +343,10 @@ function init_tiny(size) {
|
||||
});
|
||||
|
||||
editor.on('SetContent', function (event) {
|
||||
if (globalThis.isClearingNoteData) {
|
||||
globalThis.isClearingNoteData = false;
|
||||
return;
|
||||
}
|
||||
if (!event.paste) {
|
||||
reactNativeEventHandler('noteLoaded', true);
|
||||
}
|
||||
|
||||
@@ -126,6 +126,7 @@ function attachMessageListener() {
|
||||
break;
|
||||
case 'html':
|
||||
isLoading = true;
|
||||
globalThis.isClearingNoteData = false;
|
||||
tinymce.activeEditor.mode.set('readonly');
|
||||
tinymce.activeEditor.setContent(value);
|
||||
setTimeout(function () {
|
||||
|
||||
@@ -38,7 +38,7 @@ const ColorItem = ({item, index}) => {
|
||||
const {colors} = state;
|
||||
const setColorNotes = useMenuStore(state => state.setColorNotes);
|
||||
const [headerTextState, setHeaderTextState] = useState(null);
|
||||
const alias = db.colors.alias(item.title);
|
||||
const alias = db.colors.alias(item.id);
|
||||
|
||||
const onHeaderStateChange = event => {
|
||||
if (event?.id === item.id) {
|
||||
|
||||
@@ -53,7 +53,7 @@ export const TagsSection = () => {
|
||||
get: 'tagged'
|
||||
};
|
||||
Navigation.navigate('NotesPage', params, {
|
||||
heading: '#' + db.tags.alias(item.title),
|
||||
heading: '#' + db.tags.alias(item.id),
|
||||
id: item.id,
|
||||
type: item.type
|
||||
});
|
||||
|
||||
@@ -130,7 +130,7 @@ const NoteItem = ({item, isTrash, tags}) => {
|
||||
{!isTrash && tags
|
||||
? tags.slice(0, 2)?.map(item => (
|
||||
<Button
|
||||
title={'#' + db.tags.alias(item)}
|
||||
title={'#' + db.tags.alias(item.id)}
|
||||
key={item}
|
||||
height={20}
|
||||
textStyle={{
|
||||
|
||||
@@ -33,7 +33,7 @@ export const Notes = ({route, navigation}) => {
|
||||
const [notes, setNotes] = useState([]);
|
||||
const loading = useNoteStore(state => state.loading);
|
||||
let params = route.params ? route.params : null;
|
||||
const alias = params.type === "tag" ? db.tags.alias(params.title) : params.type === "color" ? db.colors.alias(params.title) : params.title
|
||||
const alias = params.type === "tag" ? db.tags.alias(params.id) : params.type === "color" ? db.colors.alias(params.id) : params.title
|
||||
|
||||
let ranAfterInteractions = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user