mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +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",
|
||||
//TODO: need to test this on webkit and internet explorer
|
||||
"::-webkit-scrollbar": { width: 0, height: 0 },
|
||||
"-ms-overflow-style": "none"
|
||||
msOverflowStyle: "none"
|
||||
//"-ms-overflow-style": "none"
|
||||
}}
|
||||
bg={"shade"}
|
||||
px={0}
|
||||
|
||||
@@ -154,6 +154,7 @@ export default class Editor extends React.Component {
|
||||
clearTimeout(this.timeout);
|
||||
this.timeout = setTimeout(async () => {
|
||||
this.id = await this.saveNote();
|
||||
ev.emit("refreshNotes");
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
@@ -192,13 +193,8 @@ export default class Editor extends React.Component {
|
||||
ref={ref => (this.quillRef = ref)}
|
||||
modules={modules}
|
||||
theme="snow"
|
||||
onChange={e => {
|
||||
onChange={() => {
|
||||
this.save();
|
||||
|
||||
console.log(this.quill.getText());
|
||||
if (this.quill.getText().length < 20) {
|
||||
ev.emit("refreshNotes");
|
||||
}
|
||||
}}
|
||||
/>
|
||||
</Flex>
|
||||
|
||||
@@ -139,6 +139,7 @@ const Properties = props => {
|
||||
justifyContent="center"
|
||||
alignItems="center"
|
||||
onClick={() => props.colorSelected && props.colorSelected(color)}
|
||||
key={color.label}
|
||||
>
|
||||
<Icon.Circle
|
||||
size={40}
|
||||
|
||||
@@ -33,7 +33,6 @@ function Home() {
|
||||
function onRefreshNotes() {
|
||||
let groups = db.notes.group(undefined, true);
|
||||
setNotes(groups);
|
||||
console.log("refreshing notes");
|
||||
}
|
||||
onRefreshNotes();
|
||||
ev.addListener("refreshNotes", onRefreshNotes);
|
||||
|
||||
@@ -48,7 +48,7 @@ function Trash() {
|
||||
return (
|
||||
<ListView
|
||||
type="Trash"
|
||||
getItems={db.trash.al}
|
||||
getItems={db.trash.all}
|
||||
menu={{ menuItems, dropdownRefs }}
|
||||
button={{
|
||||
content: "Clear Trash",
|
||||
|
||||
Reference in New Issue
Block a user