diff options
author | Eric Wong <e@80x24.org> | 2021-08-17 08:52:39 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2021-08-18 11:41:31 +0000 |
commit | 29dd03ae81565f1430a39969b5b5d01dac68071c (patch) | |
tree | 4181ba69752452567d9153ecb3ff89db35ea1180 /lib/PublicInbox/LeiLsMailSource.pm | |
parent | 38f2f94b97199f0f81fb93ab6d3c34651b661d6c (diff) | |
download | public-inbox-29dd03ae81565f1430a39969b5b5d01dac68071c.tar.gz |
lei: add ->lms shortcut for LeiMailSync
We access this read-only in many places (and will in more), so provide a shortcut to simplify callers.
Diffstat (limited to 'lib/PublicInbox/LeiLsMailSource.pm')
-rw-r--r-- | lib/PublicInbox/LeiLsMailSource.pm | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/PublicInbox/LeiLsMailSource.pm b/lib/PublicInbox/LeiLsMailSource.pm index cadc61ed..2d8913ac 100644 --- a/lib/PublicInbox/LeiLsMailSource.pm +++ b/lib/PublicInbox/LeiLsMailSource.pm @@ -103,8 +103,7 @@ sub _complete_ls_mail_source { my $match_cb = $lei->complete_url_prepare(\@argv); my @m = map { $match_cb->($_) } $lei->url_folder_cache->keys; my %f = map { $_ => 1 } @m; - my $sto = $lei->_lei_store; - if (my $lms = $sto ? $sto->search->lms : undef) { + if (my $lms = $lei->lms) { @m = map { $match_cb->($_) } grep( m!\A(?:imaps?|nntps?|s?news)://!, $lms->folders); @f{@m} = @m; |