aboutsummaryrefslogtreecommitdiffstats
path: root/imap.go
diff options
context:
space:
mode:
authorLibravatarLibravatar Simon Ser <[email protected]> 2019-12-03 20:06:43 +0100
committerLibravatarLibravatar Simon Ser <[email protected]> 2019-12-03 20:06:43 +0100
commit4ab5fb7f65fe8d8f0b291dbead9f0134a28eaba2 (patch)
treeb4124b996c1c183cd3f5858f99760d76d66e0ff7 /imap.go
parenta2349050d08a009aaef0633f2f8e7fe4fb8b78df (diff)
downloadalps-4ab5fb7f65fe8d8f0b291dbead9f0134a28eaba2.tar.gz
alps-4ab5fb7f65fe8d8f0b291dbead9f0134a28eaba2.tar.bz2
alps-4ab5fb7f65fe8d8f0b291dbead9f0134a28eaba2.zip
Make message view's Back link set the mailbox page
This allows to go back and forth between the mailbox view and the message view. References: https://todo.sr.ht/~sircmpwn/koushin/22
Diffstat (limited to 'imap.go')
-rw-r--r--imap.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/imap.go b/imap.go
index 9c83fc7..9081689 100644
--- a/imap.go
+++ b/imap.go
@@ -213,7 +213,7 @@ func listMessages(conn *imapclient.Client, mboxName string, page int) ([]imapMes
mbox := conn.Mailbox()
to := int(mbox.Messages) - page*messagesPerPage
- from := to - messagesPerPage
+ from := to - messagesPerPage + 1
if from <= 0 {
from = 1
}