• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

atinc / ngx-tethys / d9ae709b-3c27-4b69-b125-b8b80b54f90b

pending completion
d9ae709b-3c27-4b69-b125-b8b80b54f90b

Pull #2757

circleci

mengshuicmq
fix: fix code review
Pull Request #2757: feat(color-picker): color-picker support disabled (#INFR-8645)

98 of 6315 branches covered (1.55%)

Branch coverage included in aggregate %.

1 of 1 new or added line in 1 file covered. (100.0%)

2392 of 13661 relevant lines covered (17.51%)

83.12 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/message/abstract/abstract-message-queue.service.ts
1
import { BehaviorSubject } from 'rxjs';
2
import { ThyGlobalMessageConfig } from '../message.config';
3
import { ThyAbstractMessageRef } from './abstract-message-ref';
4

5
/**
6
 * @internal
7
 */
×
8
export class ThyAbstractMessageQueue<TReferences extends ThyAbstractMessageRef = ThyAbstractMessageRef> {
9
    queues$ = new BehaviorSubject<TReferences[]>([]);
10

×
11
    protected defaultConfig: ThyGlobalMessageConfig;
×
12

13
    get queues() {
14
        return this.queues$.getValue();
×
15
    }
×
16

×
17
    constructor(defaultConfig: ThyGlobalMessageConfig) {
×
18
        this.defaultConfig = defaultConfig;
19
    }
×
20

21
    add(messageRef: TReferences) {
22
        const queues = this.queues$.getValue();
×
23
        if (this.queues.length >= this.defaultConfig.maxStack) {
×
24
            const closedRef = queues.shift();
×
25
            closedRef.close();
26
        }
27
        this.queues$.next([...queues, messageRef]);
×
28
    }
×
29

×
30
    remove(id: string) {
×
31
        if (!id) {
32
            this.queues.forEach(item => item.close());
33
            this.queues$.next([]);
34
        } else {
35
            const removeItem = this.queues.find(item => item.id === id);
36
            removeItem?.close();
37
            const afterRemovedQueues = this.queues.filter(item => item.id !== id);
38
            this.queues$.next(afterRemovedQueues);
39
        }
40
    }
41
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc