fix: desktop notification not (yet?) supported on macos

This commit is contained in:
Yannick Mauray 2024-06-27 20:48:05 +02:00
parent 02c3a9031a
commit 97f7832c27
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class Downloader extends StatefulWidget {
} }
class _DownloaderState extends State<Downloader> { class _DownloaderState extends State<Downloader> {
final notificationsClient = NotificationsClient(); final notificationsClient = Platform.isMacOS ? null : NotificationsClient();
final curlPattern = RegExp("( [0-9.]+%)"); final curlPattern = RegExp("( [0-9.]+%)");
late final Stream<double> _progressStream; late final Stream<double> _progressStream;
bool _downloadFinished = false; bool _downloadFinished = false;
@ -71,7 +71,7 @@ class _DownloaderState extends State<Downloader> {
controller.close(); controller.close();
setState(() { setState(() {
_downloadFinished = true; _downloadFinished = true;
notificationsClient.notify( notificationsClient?.notify(
_cancelled _cancelled
? context.t('Download cancelled') ? context.t('Download cancelled')
: context.t('Download complete'), : context.t('Download complete'),