aboutsummaryrefslogtreecommitdiff
path: root/src/content/repositories/FollowSlaveRepository.ts
blob: 4c2de72c66c4f84d0f86a5c6d19bd30faaff4a5b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
export default interface FollowSlaveRepository {
  enableFollowMode(): void;

  disableFollowMode(): void;

  isFollowMode(): boolean;

  // eslint-disable-next-line semi
}

const current: {
  enabled: boolean;
} = {
  enabled: false,
};

export class FollowSlaveRepositoryImpl implements FollowSlaveRepository {
  enableFollowMode(): void {
    current.enabled = true;
  }

  disableFollowMode(): void {
    current.enabled = false;
  }

  isFollowMode(): boolean {
    return current.enabled;
  }
}