mirror of
https://github.com/NicolasConstant/sengi
synced 2025-01-04 20:52:34 +01:00
clean up
This commit is contained in:
parent
57f863e2a1
commit
65c147bc6f
src/app
@ -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;
|
||||
|
@ -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) {
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user