1
0
mirror of https://github.com/NicolasConstant/sengi synced 2025-01-04 20:52:34 +01:00
This commit is contained in:
Nicolas Constant 2022-12-10 18:55:20 -05:00
parent 57f863e2a1
commit 65c147bc6f
No known key found for this signature in database
GPG Key ID: 1E9F677FB01A5688
2 changed files with 5 additions and 8 deletions
src/app

View File

@ -686,7 +686,6 @@ export class CreateStatusComponent implements OnInit, OnDestroy {
let cwPolicy = this.toolsService.checkContentWarning(status);
let statusWrapper = new StatusWrapper(status, account, cwPolicy.applyCw, cwPolicy.hide);
//TODO: foreach account
this.statusesStateService.statusEditedStatusChanged(status.url, account.id, statusWrapper);
return status;

View File

@ -31,7 +31,7 @@ export class StatusesStateService {
this.cachedStatusStates[statusId] = {};
if (!this.cachedStatusStates[statusId][accountId]) {
this.cachedStatusStates[statusId][accountId] = new StatusState(statusId, accountId, isFavorited, null, null, null, null, null);
this.cachedStatusStates[statusId][accountId] = new StatusState(statusId, accountId, isFavorited, null, null, null, null);
} else {
this.cachedStatusStates[statusId][accountId].isFavorited = isFavorited;
}
@ -44,7 +44,7 @@ export class StatusesStateService {
this.cachedStatusStates[statusId] = {};
if (!this.cachedStatusStates[statusId][accountId]) {
this.cachedStatusStates[statusId][accountId] = new StatusState(statusId, accountId, null, isRebloged, null, null, null, null);
this.cachedStatusStates[statusId][accountId] = new StatusState(statusId, accountId, null, isRebloged, null, null, null);
} else {
this.cachedStatusStates[statusId][accountId].isRebloged = isRebloged;
}
@ -57,7 +57,7 @@ export class StatusesStateService {
this.cachedStatusStates[statusId] = {};
if (!this.cachedStatusStates[statusId][accountId]) {
this.cachedStatusStates[statusId][accountId] = new StatusState(statusId, accountId, null, null, isBookmarked, null, null, null);
this.cachedStatusStates[statusId][accountId] = new StatusState(statusId, accountId, null, null, isBookmarked, null, null);
} else {
this.cachedStatusStates[statusId][accountId].isBookmarked = isBookmarked;
}
@ -70,10 +70,9 @@ export class StatusesStateService {
this.cachedStatusStates[statusId] = {};
if (!this.cachedStatusStates[statusId][accountId]) {
this.cachedStatusStates[statusId][accountId] = new StatusState(statusId, accountId, null, null, null, true, new Date().toISOString(), editedStatus);
this.cachedStatusStates[statusId][accountId] = new StatusState(statusId, accountId, null, null, null, true, editedStatus);
} else {
this.cachedStatusStates[statusId][accountId].isEdited = true;
this.cachedStatusStates[statusId][accountId].editionTime = new Date().toISOString();
this.cachedStatusStates[statusId][accountId].editedStatus = editedStatus;
}
@ -117,8 +116,7 @@ export class StatusState {
public isFavorited: boolean,
public isRebloged: boolean,
public isBookmarked: boolean,
public isEdited: boolean,
public editionTime: string,
public isEdited: boolean,
public editedStatus: StatusWrapper) {
}
}