Skip to content

Commit

Permalink
Merge pull request #1648 from shadow-dot-cat/castaway/1552_dragmove
Browse files Browse the repository at this point in the history
fix(messagelist): Clear message selection after user action
  • Loading branch information
castaway authored Jan 23, 2025
2 parents 4a58c0d + 684ecaa commit b2699b3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/app/app.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -910,7 +910,7 @@ export class AppComponent implements OnInit, AfterViewInit, CanvasTableSelectLis
}

public clearSelection() {
if (this.canvastable.rows && this.canvastable.rows.rowCount() > 0) {
if (this.canvastable.rows) {
this.canvastable.rows.clearSelection();
}
this.canvastable.hasChanges = true;
Expand Down Expand Up @@ -1102,6 +1102,10 @@ export class AppComponent implements OnInit, AfterViewInit, CanvasTableSelectLis
this.searchService.moveMessagesToFolder(msgIds, folderPath);
}
this.messagelistservice.moveMessages(msgIds, folderPath);
this.clearSelection();
if(this.singlemailviewer && this.singlemailviewer.messageId && messageIds.includes(this.singlemailviewer.messageId)) {
this.singlemailviewer.close();
}
},
updateRemote: (msgIds: number[]) => {
const userFolders = this.messagelistservice.folderListSubject.value;
Expand Down Expand Up @@ -1137,7 +1141,9 @@ export class AppComponent implements OnInit, AfterViewInit, CanvasTableSelectLis
}
this.messagelistservice.moveMessages(msgIds, folderPath);
this.clearSelection();
this.canvastable.rows.clearOpenedRow();
if(this.singlemailviewer && this.singlemailviewer.messageId && messageIds.includes(this.singlemailviewer.messageId)) {
this.singlemailviewer.close();
}
},
updateRemote: (msgIds: number[]) => {
const userFolders = this.messagelistservice.folderListSubject.value;
Expand Down

0 comments on commit b2699b3

Please sign in to comment.