27 lines
561 B
Dart
27 lines
561 B
Dart
import '../../core/data/models/drama.dart';
|
|
import '../../core/data/repositories/watch_history_repository.dart';
|
|
|
|
class MineLogic {
|
|
MineLogic({
|
|
required this.history,
|
|
required this.drama,
|
|
required int initialSection,
|
|
}) : section = initialSection {
|
|
refreshPosition();
|
|
}
|
|
|
|
final WatchHistoryRepository history;
|
|
Drama drama;
|
|
late Future<Duration?> position;
|
|
int section;
|
|
int filter = 0;
|
|
|
|
void refreshPosition() {
|
|
position = history.positionFor(
|
|
demoProfileId,
|
|
drama.id,
|
|
drama.episodes.first.id,
|
|
);
|
|
}
|
|
}
|