feat(interaction): 支持游客点赞收藏评论
This commit is contained in:
1 parent
188811fde6
commit
a3d50eb935
18 files changed
+364
-121
No files matched your search
@@ -12,6 +12,7 @@ import '../../core/data/models/drama.dart';
|
||||
import '../../core/data/models/episode_stats.dart';
|
||||
import '../../core/data/repositories/comment_repository.dart';
|
||||
import '../../core/data/services/catalog_controller.dart';
|
||||
import '../../core/data/services/auth_controller.dart';
|
||||
import '../../core/data/services/favorite_controller.dart';
|
||||
import '../../core/data/services/download_controller.dart';
|
||||
import '../../core/data/services/interaction_controller.dart';
|
||||
@@ -168,6 +169,7 @@ class _PlayerPageState extends State<PlayerPage>
|
||||
positionCache: context.read<PlaybackPositionCache>(),
|
||||
wallet: widget.wallet,
|
||||
downloads: widget.downloads,
|
||||
isSignedIn: () => context.read<AuthController>().isSignedIn,
|
||||
);
|
||||
logic.onEpisodeStatsUpdated = _applyEpisodeStats;
|
||||
logic.attach(widget, isMounted: () => mounted);
|
||||
@@ -590,7 +592,7 @@ class _PlayerPageState extends State<PlayerPage>
|
||||
Episode episode,
|
||||
) async {
|
||||
final comments = context.read<CommentRepository>();
|
||||
await openCommentsWithAuth(
|
||||
await openComments(
|
||||
context,
|
||||
drama,
|
||||
show: (context, drama) =>
|
||||
@@ -617,6 +619,13 @@ class _PlayerPageState extends State<PlayerPage>
|
||||
Widget _buildPlayer(BuildContext context) {
|
||||
final interactions = context.watch<InteractionController>();
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
final indices = logic.visibleIndices;
|
||||
if (indices.isEmpty) {
|
||||
return const ColoredBox(
|
||||
color: AppColors.mediaBlack,
|
||||
child: SizedBox.expand(),
|
||||
);
|
||||
}
|
||||
if (kDebugMode && !_loggedStartConditions) {
|
||||
_loggedStartConditions = true;
|
||||
debugPrint(
|
||||
@@ -630,7 +639,6 @@ class _PlayerPageState extends State<PlayerPage>
|
||||
'mayPlay=${logic.session.debugMayPlay}',
|
||||
);
|
||||
}
|
||||
final indices = logic.visibleIndices;
|
||||
final activePort = logic.session.active;
|
||||
final activeVideo = activePort is VideoPlayerPort ? activePort : null;
|
||||
final canWaitForVideoFrame =
|
||||
|
||||
Reference in new issue
Block a user