refactor: remove dead code across codebase
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
import 'dart:async';
|
||||
import 'dart:io';
|
||||
import 'dart:collection';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:plezy/utils/content_utils.dart';
|
||||
import '../models/download_models.dart';
|
||||
@@ -450,13 +449,6 @@ class DownloadProvider extends ChangeNotifier {
|
||||
);
|
||||
}
|
||||
|
||||
/// Whether there are any downloads (active or completed)
|
||||
bool get hasDownloads => _downloads.isNotEmpty;
|
||||
|
||||
/// Whether there are any active downloads
|
||||
bool get hasActiveDownloads =>
|
||||
_downloads.values.any((p) => p.status == DownloadStatus.downloading || p.status == DownloadStatus.queued);
|
||||
|
||||
/// Get download progress for a specific item
|
||||
/// For shows/seasons, returns aggregate progress of all child episodes
|
||||
/// For episodes/movies, returns direct progress
|
||||
@@ -947,15 +939,9 @@ class DownloadProvider extends ChangeNotifier {
|
||||
notifyListeners();
|
||||
}
|
||||
|
||||
/// Check if an item is being deleted
|
||||
bool isDeleting(String globalKey) => _deletionProgress.containsKey(globalKey);
|
||||
|
||||
/// Get deletion progress for an item
|
||||
DeletionProgress? getDeletionProgress(String globalKey) => _deletionProgress[globalKey];
|
||||
|
||||
/// Get all items currently being deleted
|
||||
UnmodifiableMapView<String, DeletionProgress> get deletionProgress => UnmodifiableMapView(_deletionProgress);
|
||||
|
||||
/// Refresh the downloads list from database
|
||||
Future<void> refresh() async {
|
||||
await _loadPersistedDownloads();
|
||||
|
||||
Reference in New Issue
Block a user