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
b304564e
Commit
b304564e
authored
Nov 15, 2017
by
rswindell
Browse files
When toggling SPAM visibility, go to the first msg, not the last.
parent
d21d8505
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
src/sbbs3/readmail.cpp
src/sbbs3/readmail.cpp
+11
-7
No files found.
src/sbbs3/readmail.cpp
View file @
b304564e
...
...
@@ -229,12 +229,16 @@ void sbbs_t::readmail(uint usernumber, int which)
mail
=
loadmail
(
&
smb
,
&
smb
.
msgs
,
usernumber
,
which
,
lm_mode
);
/* So re-load */
if
(
!
smb
.
msgs
)
break
;
if
(
lm_mode
!=
last_mode
)
smb
.
curmsg
=
0
;
else
{
for
(
smb
.
curmsg
=
0
;
smb
.
curmsg
<
smb
.
msgs
;
smb
.
curmsg
++
)
if
(
mail
[
smb
.
curmsg
].
number
==
msg
.
idx
.
number
)
break
;
if
(
smb
.
curmsg
>=
smb
.
msgs
)
smb
.
curmsg
=
(
smb
.
msgs
-
1
);
}
last_mode
=
lm_mode
;
for
(
smb
.
curmsg
=
0
;
smb
.
curmsg
<
smb
.
msgs
;
smb
.
curmsg
++
)
if
(
mail
[
smb
.
curmsg
].
number
==
msg
.
idx
.
number
)
break
;
if
(
smb
.
curmsg
>=
smb
.
msgs
)
smb
.
curmsg
=
(
smb
.
msgs
-
1
);
continue
;
}
...
...
@@ -764,12 +768,12 @@ void sbbs_t::readmail(uint usernumber, int which)
case
'V'
:
/* View SPAM (toggle) */
{
domsg
=
false
;
int
spam
=
getmail
(
&
cfg
,
usernumber
,
/* Sent: */
FALSE
,
/*
SPAM-ONLY */
TRUE
);
int
spam
=
getmail
(
&
cfg
,
usernumber
,
/* Sent: */
FALSE
,
/*
attr: */
MSG_SPAM
);
if
(
!
spam
)
{
bprintf
(
text
[
NoMailWaiting
],
"SPAM"
);
break
;
}
if
(
spam
>=
getmail
(
&
cfg
,
usernumber
,
/* Sent: */
FALSE
,
/*
SPAM-ONLY */
FALSE
))
{
if
(
spam
>=
getmail
(
&
cfg
,
usernumber
,
/* Sent: */
FALSE
,
/*
attr: */
0
))
{
bprintf
(
text
[
NoMailWaiting
],
"HAM"
);
break
;
}
...
...
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