Commit 9e4f5426 authored by ransome1's avatar ransome1
Browse files

Fixed filter bug

parent 45c505f7
{
"name": "sleek",
"productName": "sleek",
"version": "1.2.4",
"version": "1.2.5-rc.1",
"description": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"synopsis": "todo.txt manager for Linux, Windows and MacOS, free and open-source (FOSS)",
"category": "ProjectManagement",
......@@ -147,7 +147,7 @@
"jstodotxt": "^0.10.0",
"marked": "^4.0.12",
"peggy": "^1.2.0",
"playwright": "^1.23.1",
"playwright": "^1.26.1",
"sass": "^1.34.1",
"sugar": "^2.0.6",
"vanillajs-datepicker": "^1.1.4"
......
name: sleek
base: core18
version: "1.2.4"
version: "1.2.5"
summary: todo.txt manager for Linux, free and open-source (FOSS)
description: |
sleek is an open-source (FOSS) todo manager based on the todo.txt syntax. Stripped down to only the most necessary features, and with a clean and simple interface, sleek aims to help you focus on getting things done.
......
......@@ -67,8 +67,8 @@ function saveFilter(newFilter, oldFilter, category) {
// write the data to the file
// a newline character is added to prevent other todo.txt apps to append new todos to the last line
window.api.send("writeToFile", [items.objects.join("\n").toString() + "\n"]);
window.api.send("replaceFileContent", [items.objects.join("\n").toString() + "\n"]);
// trigger matomo event
if(userData.matomoEvents) _paq.push(["trackEvent", "Filter-Drawer", "Filter renamed"]);
......@@ -107,7 +107,7 @@ function deleteFilter(filter, category) {
//write the data to the file
// a newline character is added to prevent other todo.txt apps to append new todos to the last line
window.api.send("writeToFile", [items.objects.join("\n").toString() + "\n"]);
window.api.send("replaceFileContent", [items.objects.join("\n").toString() + "\n"]);
// trigger matomo event
if(userData.matomoEvents) _paq.push(["trackEvent", "Filter-Drawer", "Filter deleted"]);
......
......@@ -460,7 +460,7 @@ function configureWindowEvents() {
.on("replaceFileContent", async function(event, args) {
const content = args[0];
const file = args[1];
const file = (args[1]) ? args[1] : await getActiveFile()[1];
if(process.mas) stopAccessingSecurityScopedResource = app.startAccessingSecurityScopedResource(getActiveFile()[3])
......@@ -482,7 +482,7 @@ function configureWindowEvents() {
// delete element in array
if(index >= 0 && !data) fileAsArray.splice(index, 1);
//if(index === undefined && data) contentToWrite = data;
if(index === undefined && data) contentToWrite = data;
// building string to write in file
// when file is defined, but no index, it will be an archiving operation
......
......@@ -26,4 +26,5 @@ x 2022-04-08 This is a test todo that needs to be archived
x 2022-04-12 This is a test todo that needs to be archived
x 2022-06-13 This is a test todo that needs to be archived
x 2022-07-01 This is a test todo that needs to be archived
x 2022-09-29 This is a test todo that needs to be archived
\ No newline at end of file
x 2022-09-29 This is a test todo that needs to be archived
x 2022-10-04 This is a test todo that needs to be archived
\ No newline at end of file
......@@ -2007,7 +2007,7 @@ playwright-core@1.26.1:
resolved "https://registry.yarnpkg.com/playwright-core/-/playwright-core-1.26.1.tgz#a162f476488312dcf12638d97685144de6ada512"
integrity sha512-hzFchhhxnEiPc4qVPs9q2ZR+5eKNifY2hQDHtg1HnTTUuphYCBP8ZRb2si+B1TR7BHirgXaPi48LIye5SgrLAA==
playwright@^1.23.1:
playwright@^1.26.1:
version "1.26.1"
resolved "https://registry.yarnpkg.com/playwright/-/playwright-1.26.1.tgz#0082c1d6a1c9cefe3f7a593396ad8568746184d0"
integrity sha512-WQmEdCgYYe8jOEkhkW9QLcK0PB+w1RZztBLYIT10MEEsENYg251cU0IzebDINreQsUt+HCwwRhtdz4weH9ICcQ==
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment