Remove redundant comment in AppealDiscord and enhance state handling in SentComponent.
This commit is contained in:
parent
4962d16abd
commit
1f1f1793e3
|
|
@ -40,7 +40,6 @@ public class AppealDiscord {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// Fetch counts for user
|
|
||||||
CompletableFuture<Integer> bansF = getCountAsync(HistoryType.BAN, appeal.uuid());
|
CompletableFuture<Integer> bansF = getCountAsync(HistoryType.BAN, appeal.uuid());
|
||||||
CompletableFuture<Integer> mutesF = getCountAsync(HistoryType.MUTE, appeal.uuid());
|
CompletableFuture<Integer> mutesF = getCountAsync(HistoryType.MUTE, appeal.uuid());
|
||||||
CompletableFuture<Integer> warnsF = getCountAsync(HistoryType.WARN, appeal.uuid());
|
CompletableFuture<Integer> warnsF = getCountAsync(HistoryType.WARN, appeal.uuid());
|
||||||
|
|
|
||||||
|
|
@ -16,11 +16,11 @@ export class SentComponent implements OnInit {
|
||||||
private router: Router = inject(Router)
|
private router: Router = inject(Router)
|
||||||
|
|
||||||
ngOnInit() {
|
ngOnInit() {
|
||||||
const navigation = this.router.getCurrentNavigation();
|
const state = this.router.getCurrentNavigation()?.extras.state || history.state;
|
||||||
const state = navigation?.extras.state as { message: string };
|
|
||||||
|
|
||||||
if (state?.message) {
|
if (state && 'message' in state) {
|
||||||
this.message = state.message;
|
this.message = state.message as string;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user