fix order of old/new in compare

This commit is contained in:
Stephan Dilly 2021-08-21 15:56:21 +02:00
parent 5672cfd033
commit 3db3b95dd0

View File

@ -52,7 +52,15 @@ impl CompareDetailsComponent {
let c1 = sync::get_commit_details(CWD, ids.0).ok();
let c2 = sync::get_commit_details(CWD, ids.1).ok();
c1.and_then(|c1| c2.map(|c2| (c1, c2)))
c1.and_then(|c1| {
c2.map(|c2| {
if c1.author.time < c2.author.time {
(c1, c2)
} else {
(c2, c1)
}
})
})
});
}