mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Change scanRecursively to an Option field
This commit is contained in:
@ -24,7 +24,7 @@ case class ScanMailboxArgs(
|
|||||||
// the configured imap connection
|
// the configured imap connection
|
||||||
imapConnection: Ident,
|
imapConnection: Ident,
|
||||||
// scan folders recursively
|
// scan folders recursively
|
||||||
scanRecursively: Boolean,
|
scanRecursively: Option[Boolean],
|
||||||
// what folders to search
|
// what folders to search
|
||||||
folders: List[String],
|
folders: List[String],
|
||||||
// only select mails received since then
|
// only select mails received since then
|
||||||
|
@ -98,7 +98,7 @@ object ScanMailboxTask {
|
|||||||
if (acc.noneLeft(name)) acc.pure[F]
|
if (acc.noneLeft(name)) acc.pure[F]
|
||||||
else
|
else
|
||||||
mailer
|
mailer
|
||||||
.run(impl.handleFolder(theEmil.access, upload)(name, ctx.args.scanRecursively))
|
.run(impl.handleFolder(theEmil.access, upload)(name, ctx.args.scanRecursively.getOrElse(false)))
|
||||||
.map(_ ++ acc)
|
.map(_ ++ acc)
|
||||||
|
|
||||||
Stream
|
Stream
|
||||||
|
@ -115,7 +115,7 @@ object ScanMailboxRoutes {
|
|||||||
ScanMailboxArgs(
|
ScanMailboxArgs(
|
||||||
user,
|
user,
|
||||||
settings.imapConnection,
|
settings.imapConnection,
|
||||||
settings.scanRecursively,
|
Option(settings.scanRecursively),
|
||||||
settings.folders,
|
settings.folders,
|
||||||
settings.receivedSinceHours.map(_.toLong).map(Duration.hours),
|
settings.receivedSinceHours.map(_.toLong).map(Duration.hours),
|
||||||
settings.targetFolder,
|
settings.targetFolder,
|
||||||
@ -151,7 +151,7 @@ object ScanMailboxRoutes {
|
|||||||
task.summary,
|
task.summary,
|
||||||
conn.getOrElse(Ident.unsafe("")),
|
conn.getOrElse(Ident.unsafe("")),
|
||||||
task.args.folders,
|
task.args.folders,
|
||||||
task.args.scanRecursively,
|
task.args.scanRecursively.getOrElse(false),
|
||||||
task.timer,
|
task.timer,
|
||||||
task.args.receivedSince.map(_.hours.toInt),
|
task.args.receivedSince.map(_.hours.toInt),
|
||||||
task.args.targetFolder,
|
task.args.targetFolder,
|
||||||
|
Reference in New Issue
Block a user