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
This commit is contained in:
parent
a2349050d0
commit
4ab5fb7f65
2
imap.go
2
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
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@
|
|||
<h1>koushin</h1>
|
||||
|
||||
<p>
|
||||
<a href="/mailbox/{{.Mailbox.Name | pathescape}}">Back</a>
|
||||
<a href="/mailbox/{{.Mailbox.Name | pathescape}}?page={{.MailboxPage}}">
|
||||
Back
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<h2>
|
||||
|
|
Loading…
Reference in a new issue