Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ransome
sleek
Commits
3228f138
Commit
3228f138
authored
Oct 04, 2022
by
ransome1
Browse files
Fixed recurrences bug
parent
622369e8
Changes
2
Hide whitespace changes
Inline
Side-by-side
package.json
View file @
3228f138
{
"name"
:
"sleek"
,
"productName"
:
"sleek"
,
"version"
:
"1.2.4-rc.
2
"
,
"version"
:
"1.2.4-rc.
3
"
,
"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"
,
...
...
src/js/recurrences.mjs
View file @
3228f138
...
...
@@ -80,8 +80,7 @@ function generateRecurrence(todo) {
const
index
=
items
.
objects
.
map
(
function
(
item
)
{
return
item
.
toString
().
replaceAll
(
String
.
fromCharCode
(
16
),
"
"
);
}).
indexOf
(
recurringTodo
.
toString
().
replaceAll
(
String
.
fromCharCode
(
16
),
"
"
));
// only add recurring todo if it is not already in the list
if
(
index
===-
1
)
{
items
.
objects
.
push
(
recurringTodo
);
window
.
api
.
send
(
"
writeToFile
"
,
[
items
.
objects
.
join
(
"
\n
"
).
toString
()
+
"
\n
"
]);
window
.
api
.
send
(
"
writeToFile
"
,
[
recurringTodo
.
toString
(),
index
]);
return
Promise
.
resolve
(
"
Success: Recurring todo created and written into file:
"
+
getActiveFile
());
}
else
{
return
Promise
.
resolve
(
"
Info: Recurring todo already in file, won't write anything
"
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment