이클립스 흐름 — 배너 진입 · 이벤트 버튼 · 오버레이 · 방어 진행 표시 · 흔들기 감지 통일
This commit is contained in:
@@ -12,7 +12,7 @@ class NoEclipseRepository implements EclipseRepository {
|
||||
const NoEclipseRepository();
|
||||
|
||||
@override
|
||||
Stream<EclipseState?> watch({String? fandomId, bool includeResults = false}) => Stream.value(null);
|
||||
Stream<EclipseState?> watch({String? fandomId, bool includeResults = false, bool includeScheduled = false}) => Stream.value(null);
|
||||
|
||||
@override
|
||||
Stream<List<LiveEvent>> liveEvents({String? fandomId, int limit = 20}) =>
|
||||
@@ -69,7 +69,7 @@ class FakeEclipseRepository implements EclipseRepository {
|
||||
}
|
||||
|
||||
@override
|
||||
Stream<EclipseState?> watch({String? fandomId, bool includeResults = false}) async* {
|
||||
Stream<EclipseState?> watch({String? fandomId, bool includeResults = false, bool includeScheduled = false}) async* {
|
||||
yield _last;
|
||||
yield* _eclipse.stream;
|
||||
}
|
||||
@@ -110,6 +110,8 @@ EclipseState eclipseFixture({
|
||||
int defenseCount = 12,
|
||||
bool defended = false,
|
||||
EclipseResult? result,
|
||||
DateTime? startAt,
|
||||
bool scheduled = false,
|
||||
DateTime? endsAt,
|
||||
}) => EclipseState(
|
||||
fandomId: fandomId,
|
||||
@@ -121,6 +123,8 @@ EclipseState eclipseFixture({
|
||||
defenseCount: defenseCount,
|
||||
defended: defended,
|
||||
result: result,
|
||||
startAt: startAt,
|
||||
scheduled: scheduled,
|
||||
// 마감이 없으면 화면이 「지났는가」를 물을 수 없다. 기본을 넉넉히 둔다.
|
||||
endsAt: endsAt ?? DateTime.now().add(const Duration(minutes: 20)),
|
||||
);
|
||||
@@ -142,7 +146,7 @@ class CountingEclipseRepository implements EclipseRepository {
|
||||
int active = 0;
|
||||
|
||||
@override
|
||||
Stream<EclipseState?> watch({String? fandomId, bool includeResults = false}) {
|
||||
Stream<EclipseState?> watch({String? fandomId, bool includeResults = false, bool includeScheduled = false}) {
|
||||
late StreamController<EclipseState?> controller;
|
||||
controller = StreamController<EclipseState?>(
|
||||
onListen: () {
|
||||
|
||||
Reference in New Issue
Block a user