More webapp changes+fixes
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Component, inject, signal, OnInit, computed } from '@angular/core';
|
||||
import { Component, inject, signal, OnInit, computed, effect } from '@angular/core';
|
||||
import { CommonModule, DatePipe } from '@angular/common';
|
||||
import { ActivatedRoute, Router, RouterLink } from '@angular/router';
|
||||
import { NzCardModule } from 'ng-zorro-antd/card';
|
||||
@@ -66,6 +66,15 @@ export class MessageDetailComponent implements OnInit {
|
||||
|
||||
showDeliveries = computed(() => this.expertMode() && this.isChannelOwner());
|
||||
|
||||
constructor() {
|
||||
// Watch for expert mode changes and load deliveries when it becomes visible
|
||||
effect(() => {
|
||||
if (this.showDeliveries() && this.message() && this.deliveries().length === 0 && !this.loadingDeliveries()) {
|
||||
this.loadDeliveries(this.message()!.message_id);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
const messageId = this.route.snapshot.paramMap.get('id');
|
||||
if (messageId) {
|
||||
|
||||
Reference in New Issue
Block a user