aboutsummaryrefslogtreecommitdiff
path: root/src/content/repositories/FollowSlaveRepository.ts
blob: 0dc9e896df92c8cf38cd4164aa9a1d8efec539a6 (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
export default interface FollowSlaveRepository {
  enableFollowMode(): void;

  disableFollowMode(): void;

  isFollowMode(): boolean;
}

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;
  }
}