mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-20 21:49:32 +01:00
fix: trash, warnings & note list refresh (#7)
* Fix trash not working * Fix key not assigned to list warning * -ms-overflow-style -> msOverflowStyle * Use timer to refresh note list in navigator * remove unused code Co-authored-by: Abdullah Atta <abdullahatta31@gmail.com>
This commit is contained in:
@@ -109,7 +109,8 @@ function App() {
|
|||||||
scrollbarWidth: "none",
|
scrollbarWidth: "none",
|
||||||
//TODO: need to test this on webkit and internet explorer
|
//TODO: need to test this on webkit and internet explorer
|
||||||
"::-webkit-scrollbar": { width: 0, height: 0 },
|
"::-webkit-scrollbar": { width: 0, height: 0 },
|
||||||
"-ms-overflow-style": "none"
|
msOverflowStyle: "none"
|
||||||
|
//"-ms-overflow-style": "none"
|
||||||
}}
|
}}
|
||||||
bg={"shade"}
|
bg={"shade"}
|
||||||
px={0}
|
px={0}
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ export default class Editor extends React.Component {
|
|||||||
clearTimeout(this.timeout);
|
clearTimeout(this.timeout);
|
||||||
this.timeout = setTimeout(async () => {
|
this.timeout = setTimeout(async () => {
|
||||||
this.id = await this.saveNote();
|
this.id = await this.saveNote();
|
||||||
|
ev.emit("refreshNotes");
|
||||||
}, 1000);
|
}, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,13 +193,8 @@ export default class Editor extends React.Component {
|
|||||||
ref={ref => (this.quillRef = ref)}
|
ref={ref => (this.quillRef = ref)}
|
||||||
modules={modules}
|
modules={modules}
|
||||||
theme="snow"
|
theme="snow"
|
||||||
onChange={e => {
|
onChange={() => {
|
||||||
this.save();
|
this.save();
|
||||||
|
|
||||||
console.log(this.quill.getText());
|
|
||||||
if (this.quill.getText().length < 20) {
|
|
||||||
ev.emit("refreshNotes");
|
|
||||||
}
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</Flex>
|
</Flex>
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ const Properties = props => {
|
|||||||
justifyContent="center"
|
justifyContent="center"
|
||||||
alignItems="center"
|
alignItems="center"
|
||||||
onClick={() => props.colorSelected && props.colorSelected(color)}
|
onClick={() => props.colorSelected && props.colorSelected(color)}
|
||||||
|
key={color.label}
|
||||||
>
|
>
|
||||||
<Icon.Circle
|
<Icon.Circle
|
||||||
size={40}
|
size={40}
|
||||||
|
|||||||
@@ -33,7 +33,6 @@ function Home() {
|
|||||||
function onRefreshNotes() {
|
function onRefreshNotes() {
|
||||||
let groups = db.notes.group(undefined, true);
|
let groups = db.notes.group(undefined, true);
|
||||||
setNotes(groups);
|
setNotes(groups);
|
||||||
console.log("refreshing notes");
|
|
||||||
}
|
}
|
||||||
onRefreshNotes();
|
onRefreshNotes();
|
||||||
ev.addListener("refreshNotes", onRefreshNotes);
|
ev.addListener("refreshNotes", onRefreshNotes);
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ function Trash() {
|
|||||||
return (
|
return (
|
||||||
<ListView
|
<ListView
|
||||||
type="Trash"
|
type="Trash"
|
||||||
getItems={db.trash.al}
|
getItems={db.trash.all}
|
||||||
menu={{ menuItems, dropdownRefs }}
|
menu={{ menuItems, dropdownRefs }}
|
||||||
button={{
|
button={{
|
||||||
content: "Clear Trash",
|
content: "Clear Trash",
|
||||||
|
|||||||
Reference in New Issue
Block a user