Merge pull request #1910 from rhgg2/contact-less-than-antisymmetric

Make order relation on contacts antisymmetric
This commit is contained in:
Dirk-Jan C. Binnema 2021-01-23 10:57:33 +02:00 committed by GitHub
commit 01db0a4269
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -87,7 +87,7 @@ struct ContactInfoLessThan {
if (ci1.personal != ci2.personal)
return ci1.personal; // personal comes first
if (ci1.last_seen > recently_)
if ((ci1.last_seen > recently_) != (ci2.last_seen > recently_))
return ci1.last_seen > ci2.last_seen;
if (ci1.freq != ci2.freq) // more frequent comes first