feat(app): 完成 P0 钱包解锁、下载落盘与手机号登录
This commit is contained in:
1 parent
de941c841c
commit
136ee74618
47 files changed
+3264
-70
No files matched your search
@@ -20,10 +20,16 @@ Future<void> requestEpisodeDownload(
|
||||
if (!await ensureSignedIn(context)) return;
|
||||
if (!context.mounted) return;
|
||||
unawaited(context.read<Haptics>().lightImpact());
|
||||
final result = await context.read<DownloadController>().grant(episodeId);
|
||||
final downloads = context.read<DownloadController>();
|
||||
final result = await downloads.grant(episodeId);
|
||||
if (!context.mounted) return;
|
||||
final l10n = AppLocalizations.of(context)!;
|
||||
final hasBackendMessage = result.message?.trim().isNotEmpty ?? false;
|
||||
if (result.ok) {
|
||||
unawaited(
|
||||
downloads.startDownload(episodeId, license: result.license),
|
||||
);
|
||||
}
|
||||
final message = result.ok
|
||||
? l10n.downloadGranted
|
||||
: hasBackendMessage
|
||||
|
||||
Reference in new issue
Block a user