Skip to content

Commit

Permalink
fix: Comments link are no longer considered to be displayed - EXO-76566
Browse files Browse the repository at this point in the history
  • Loading branch information
akhanfir authored Jan 21, 2025
2 parents c815d59 + a3060d2 commit fc69c66
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,12 @@ export default {
this.refreshActivityTypes();
this.refreshActivityActions();
this.refreshCommentActions();
const queryParamId = this.getQueryParam('id');
if (queryParamId.includes('comment')) {
this.$root.selectedCommentId = queryParamId;
}
if (window.location.pathname.endsWith('/activity')) {
this.$root.selectedActivityId = this.getQueryParam('id');
this.$root.selectedActivityId = queryParamId;
if (window.location.hash) {
this.$root.selectedCommentId = window.location.hash.replace('#comment-reply-', '').replace('#comment-reply', '').replace('#comment-', '');
}
Expand All @@ -97,12 +101,12 @@ export default {
this.loaded = false;
this.$root.selectedActivityId = this.activityId = activityId;
const urlHash = window.location.hash;
if (urlHash.includes('#comment')){
if (urlHash.includes('#comment') || commentId.includes('comment')){
this.$root.selectedCommentId = window.location.hash.replace('#comment-reply-', '').replace('#comment-reply', '').replace('#comment-', '');
if (commentId && !this.$root.selectedCommentId) {
this.$root.selectedCommentId = commentId;
window.history.replaceState('', window.document.title, `${window.location.pathname}?id=${activityId}#comment-${commentId}`);
}
window.history.replaceState('', window.document.title, `${window.location.pathname}?id=${activityId}#comment-${commentId}`);
} else {
this.$root.selectedCommentId = '';
if (activityId) {
Expand Down

0 comments on commit fc69c66

Please sign in to comment.