From 08e8e9522405e40985935b13e9eaaf409e33da75 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 24 Jul 2020 05:55:51 +0000 Subject: v2writable: move {autime} and {cotime} into $sync state The V2Writable object may be long-lived, so it makes more sense to put the {autime} and {cotime} fields into the shorter-lived index_sync state. --- lib/PublicInbox/Smsg.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/PublicInbox/Smsg.pm') diff --git a/lib/PublicInbox/Smsg.pm b/lib/PublicInbox/Smsg.pm index 725d4206..aaf88f35 100644 --- a/lib/PublicInbox/Smsg.pm +++ b/lib/PublicInbox/Smsg.pm @@ -96,7 +96,7 @@ sub from_mitem { # for Import and v1 non-SQLite WWW code paths sub populate { - my ($self, $hdr, $v2w) = @_; + my ($self, $hdr, $sync) = @_; for my $f (qw(From To Cc Subject)) { my @all = $hdr->header($f); my $val = join(', ', @all); @@ -117,9 +117,9 @@ sub populate { } $self->{$f} = $val if $val ne ''; } - $v2w //= {}; - $self->{-ds} = [ my @ds = msg_datestamp($hdr, $v2w->{autime}) ]; - $self->{-ts} = [ my @ts = msg_timestamp($hdr, $v2w->{cotime}) ]; + $sync //= {}; + $self->{-ds} = [ my @ds = msg_datestamp($hdr, $sync->{autime}) ]; + $self->{-ts} = [ my @ts = msg_timestamp($hdr, $sync->{cotime}) ]; $self->{ds} //= $ds[0]; # no zone $self->{ts} //= $ts[0]; -- cgit v1.2.3-24-ge0c7