mirror of
https://github.com/Kong/insomnia
synced 2024-11-07 22:30:15 +00:00
Updating cards to display accurate latest change timestamp (#3201)
Updating cards to display accurate latest change timestamp
This commit is contained in:
parent
fd46942a6f
commit
1052e2c489
@ -363,7 +363,18 @@ class WrapperHome extends React.PureComponent<Props, State> {
|
||||
? apiSpec.modified
|
||||
: workspaceModified;
|
||||
|
||||
let log = <TimeFromNow timestamp={modifiedLocally} />;
|
||||
// Span spec, workspace and sync related timestamps for card last modified label and sort order
|
||||
const lastModifiedFrom = [
|
||||
workspace?.modified,
|
||||
workspaceMeta?.modified,
|
||||
apiSpec?.modified,
|
||||
workspaceMeta?.cachedGitLastCommitTime,
|
||||
];
|
||||
const lastModifiedTimestamp = lastModifiedFrom
|
||||
.filter(isNotNullOrUndefined)
|
||||
.sort(descendingNumberSort)[0];
|
||||
|
||||
let log = <TimeFromNow timestamp={lastModifiedTimestamp} />;
|
||||
let branch = lastActiveBranch;
|
||||
if (
|
||||
workspace.scope === WorkspaceScopeKeys.design &&
|
||||
@ -429,16 +440,6 @@ class WrapperHome extends React.PureComponent<Props, State> {
|
||||
return null;
|
||||
}
|
||||
|
||||
const lastModifiedFrom = [
|
||||
workspace?.modified,
|
||||
workspaceMeta?.modified,
|
||||
apiSpec?.modified,
|
||||
workspaceMeta?.cachedGitLastCommitTime,
|
||||
];
|
||||
const lastModifiedTimestamp = lastModifiedFrom
|
||||
.filter(isNotNullOrUndefined)
|
||||
.sort(descendingNumberSort)[0];
|
||||
|
||||
const card = (
|
||||
<Card
|
||||
key={apiSpec._id}
|
||||
|
Loading…
Reference in New Issue
Block a user