Skip to content

Commit

Permalink
Merge pull request 'Fix version history' (#159) from fix/bugfix into …
Browse files Browse the repository at this point in the history
…release/v8.3.0
  • Loading branch information
Julia Radzhabova committed Dec 4, 2024
2 parents 3ed4913 + 028609f commit 3b65851
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions apps/common/mobile/lib/controller/VersionHistory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ const VersionHistoryController = inject('storeAppOptions', 'storeVersionHistory'

};

historyStore.addUser(user);
version.user.id && historyStore.addUser(user);
}

arrVersions.push({
Expand Down Expand Up @@ -205,7 +205,7 @@ const VersionHistoryController = inject('storeAppOptions', 'storeVersionHistory'
color: generateUserColor(color),
};

historyStore.addUser(user);
change.user.id && historyStore.addUser(user);
}

arrVersions.push({
Expand Down
2 changes: 1 addition & 1 deletion apps/common/mobile/lib/view/VersionHistory.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ const VersionHistoryView = inject('storeVersionHistory', 'users')(observer(props
{versions.map((version, index) => {
return (
<ListItem className={`version-history__item ${version === currentVersion ? 'version-history__item_active' : ''}`} key={`version-${index}`} link='#' title={version.created} subtitle={AscCommon.UserInfoParser.getParsedName(version.username)} onClick={() => handleClickRevision(version)}>
<div slot='media' className='version-history__user' style={{backgroundColor: usersVersions.find(user => user.id === version.userid).color}}>{usersStore.getInitials(version.username)}</div>
<div slot='media' className='version-history__user' style={{backgroundColor: usersVersions.find(user => user.id === version.userid).color}}>{usersStore.getInitials(AscCommon.UserInfoParser.getParsedName(version.username))}</div>
{(version === currentVersion && !version.selected && version.canRestore) &&
<div slot="inner">
<button type='button' className='version-history__btn' onClick={() => props.onRestoreRevision(version)}>{t('Common.VersionHistory.textRestore')}</button>
Expand Down
4 changes: 2 additions & 2 deletions apps/documenteditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -749,7 +749,7 @@ define([
colorval : color,
color : this.generateUserColor(color)
});
usersStore.add(user);
version.user.id && usersStore.add(user);
}
var avatar = Common.UI.ExternalUsers.getImage(version.user.id);
(avatar===undefined) && arrIds.push(version.user.id);
Expand Down Expand Up @@ -804,7 +804,7 @@ define([
colorval : color,
color : this.generateUserColor(color)
});
usersStore.add(user);
change.user.id && usersStore.add(user);
}
avatar = Common.UI.ExternalUsers.getImage(change.user.id);
(avatar===undefined) && arrIds.push(change.user.id);
Expand Down
4 changes: 2 additions & 2 deletions apps/presentationeditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -2808,7 +2808,7 @@ define([
colorval : color,
color : this.generateUserColor(color)
});
usersStore.add(user);
version.user.id && usersStore.add(user);
}
var avatar = Common.UI.ExternalUsers.getImage(version.user.id);
(avatar===undefined) && arrIds.push(version.user.id);
Expand Down Expand Up @@ -2863,7 +2863,7 @@ define([
colorval : color,
color : this.generateUserColor(color)
});
usersStore.add(user);
change.user.id && usersStore.add(user);
}
avatar = Common.UI.ExternalUsers.getImage(change.user.id);
(avatar===undefined) && arrIds.push(change.user.id);
Expand Down
4 changes: 2 additions & 2 deletions apps/spreadsheeteditor/main/app/controller/Main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3449,7 +3449,7 @@ define([
colorval : color,
color : this.generateUserColor(color)
});
usersStore.add(user);
version.user.id && usersStore.add(user);
}
var avatar = Common.UI.ExternalUsers.getImage(version.user.id);
(avatar===undefined) && arrIds.push(version.user.id);
Expand Down Expand Up @@ -3504,7 +3504,7 @@ define([
colorval : color,
color : this.generateUserColor(color)
});
usersStore.add(user);
change.user.id && usersStore.add(user);
}
avatar = Common.UI.ExternalUsers.getImage(change.user.id);
(avatar===undefined) && arrIds.push(change.user.id);
Expand Down

0 comments on commit 3b65851

Please sign in to comment.