Skip to content

Commit

Permalink
teams: smoother voices deletion (fixes #8016)(fixes #8017) (#8019)
Browse files Browse the repository at this point in the history
Co-authored-by: mutugiii <[email protected]>
Co-authored-by: dogi <[email protected]>
  • Loading branch information
3 people authored Jan 2, 2025
1 parent 8c546a9 commit 30bf903
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "planet",
"license": "AGPL-3.0",
"version": "0.16.32",
"version": "0.16.33",
"myplanet": {
"latest": "v0.21.58",
"min": "v0.20.58"
Expand Down
5 changes: 3 additions & 2 deletions src/app/news/news-list.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,8 @@ export class NewsListComponent implements OnChanges {
data: {
okClick: this.deleteNews(news),
changeType: 'delete',
type: 'news'
type: 'news',
displayName: news.message
}
});
}
Expand All @@ -134,7 +135,7 @@ export class NewsListComponent implements OnChanges {
this.deleteDialog.close();
},
onError: (error) => {
this.planetMessageService.showAlert($localize`There was a problem deleting this news.`);
this.planetMessageService.showAlert($localize`There was a problem deleting this message.`);
}
};
}
Expand Down
6 changes: 3 additions & 3 deletions src/app/news/news.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export class NewsService {
return ((item.viewIn || []).find(view => view._id === viewId) || {}).sharedDate;
}

postNews(post, successMessage = $localize`Thank you for submitting your news`, isMessageEdit = true) {
postNews(post, successMessage = $localize`Thank you for submitting your message`, isMessageEdit = true) {
const { configuration } = this.stateService;
const message = typeof post.message === 'string' ? post.message : post.message.text;
const images = this.createImagesArray(post, message);
Expand All @@ -76,7 +76,7 @@ export class NewsService {
}

deleteNews(post) {
return this.postNews({ ...post, _deleted: true }, $localize`Post deleted`);
return this.postNews({ ...post, _deleted: true }, $localize`Message deleted`);
}

createImagesArray(post, message) {
Expand All @@ -90,7 +90,7 @@ export class NewsService {
return this.couchService.bulkDocs(this.dbName, replies.map(reply => ({ ...reply.doc, replyTo: newReplyToId })));
}

shareNews(news, planets?: any[], successMessage = $localize`News has been successfully shared`) {
shareNews(news, planets?: any[], successMessage = $localize`Message has been successfully shared`) {
const viewInObject = (planet) => (
{ '_id': `${planet.code}@${planet.parentCode}`, section: 'community', sharedDate: this.couchService.datePlaceholder }
);
Expand Down
1 change: 1 addition & 0 deletions src/app/shared/dialogs/dialogs-prompt.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
event {event}
transaction {transaction}
link {link}
news {message}
report {report}}?
}
many
Expand Down

0 comments on commit 30bf903

Please sign in to comment.