Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Main
Synchronet
Commits
aecde406
Commit
aecde406
authored
Mar 16, 2018
by
deuce
Browse files
Pass the index to operate on to apply_seen.
Fixes issues with STATUS command.
parent
fd7853fd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
exec/imapservice.js
exec/imapservice.js
+7
-6
No files found.
exec/imapservice.js
View file @
aecde406
...
...
@@ -296,7 +296,7 @@ function send_fetch_response(msgnum, fmat, uid)
seen_changed
=
true
;
saved_config
[
index
.
code
].
Seen
[
msgnum
]
=
1
;
save_cfg
(
false
);
apply_seen
();
apply_seen
(
index
);
unlock_cfg
();
idx
.
attr
|=
MSG_READ
;
}
...
...
@@ -1269,7 +1269,7 @@ function read_index(base)
return
(
index
);
}
function
apply_seen
()
function
apply_seen
(
index
)
{
var
i
;
...
...
@@ -1543,7 +1543,8 @@ var authenticated_command_handlers = {
if
(
saved_config
[
base_code
]
!=
undefined
)
old_saved
=
saved_config
[
base_code
];
read_cfg
(
base_code
,
true
);
apply_seen
();
index
=
read_index
(
base_code
);
apply_seen
(
index
);
delete
saved_config
[
base_code
];
if
(
old_saved
!=
undefined
)
saved_config
[
base_code
]
=
old_saved
;
...
...
@@ -1649,7 +1650,7 @@ function do_store(seq, uid, item, data)
}
saved_config
[
base
.
cfg
.
code
].
Seen
[
seq
[
i
]]
^=
1
;
save_cfg
(
false
);
apply_seen
();
apply_seen
(
index
);
unlock_cfg
();
}
if
(
!
silent
)
...
...
@@ -2012,7 +2013,7 @@ var selected_command_handlers = {
var
i
;
read_cfg
(
get_base_code
(
base
),
true
);
apply_seen
();
apply_seen
(
index
);
for
(
i
in
seq
)
{
send_fetch_response
(
seq
[
i
],
data_items
,
false
);
}
...
...
@@ -2063,7 +2064,7 @@ var selected_command_handlers = {
seq
=
parse_seq_set
(
args
[
2
],
true
);
data_items
=
parse_data_items
(
args
[
3
]);
read_cfg
(
get_base_code
(
base
),
true
);
apply_seen
();
apply_seen
(
index
);
for
(
i
in
seq
)
{
send_fetch_response
(
seq
[
i
],
data_items
,
true
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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