From 29dd03ae81565f1430a39969b5b5d01dac68071c Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 17 Aug 2021 08:52:39 +0000 Subject: 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. --- lib/PublicInbox/LeiLsMailSource.pm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/PublicInbox/LeiLsMailSource.pm') 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; -- cgit v1.2.3-24-ge0c7