refactor: remove dead methods from services

This commit is contained in:
edde746
2026-03-15 22:55:18 +01:00
parent ff5cf06e60
commit 3c2f72d15f
4 changed files with 0 additions and 77 deletions
-27
View File
@@ -139,31 +139,4 @@ class InAppReviewService {
// Reset session count so user needs to use app more before next prompt
await prefs.setInt(_keyQualifyingSessionsCount, 0);
}
/// Get debug info about the current state (for development/testing)
Future<Map<String, dynamic>> getDebugInfo() async {
final prefs = await _getPrefs();
final sessionCount = prefs.getInt(_keyQualifyingSessionsCount) ?? 0;
final lastPromptString = prefs.getString(_keyLastPromptTime);
final isAvailable = await _inAppReview.isAvailable();
return {
'isEnabled': isEnabled,
'isAvailable': isAvailable,
'qualifyingSessions': sessionCount,
'requiredSessions': _requiredSessions,
'lastPromptTime': lastPromptString,
'cooldownDays': _promptCooldown.inDays,
'currentSessionStartTime': _sessionStartTime?.toIso8601String(),
};
}
/// Reset all stored data (for testing purposes)
Future<void> reset() async {
final prefs = await _getPrefs();
await prefs.remove(_keyQualifyingSessionsCount);
await prefs.remove(_keyLastPromptTime);
_sessionStartTime = null;
appLogger.d('In-app review: State reset');
}
}
@@ -368,23 +368,6 @@ class KeyboardShortcutsService {
}
}
// Validate if a key combination is valid (legacy method for backward compatibility)
bool isValidKeyShortcut(String keyString) {
// For backward compatibility, assume all non-empty strings are valid
// The new system will use HotKey objects for validation
return keyString.isNotEmpty;
}
// Check if a shortcut is already assigned to another action
String? getActionForShortcut(String keyString) {
for (final entry in _shortcuts.entries) {
if (entry.value == keyString) {
return entry.key;
}
}
return null;
}
// Check if a hotkey is already assigned to another action
String? getActionForHotkey(HotKey hotkey) {
for (final entry in _hotkeys.entries) {
-15
View File
@@ -53,21 +53,6 @@ class ServerRegistry {
}
}
/// Update server status (called when server connection status changes)
Future<void> updateServerStatus(String serverId) async {
final servers = await getServers();
final serverIndex = servers.indexWhere((s) => s.clientIdentifier == serverId);
if (serverIndex == -1) {
appLogger.w('Server not found for status update: $serverId');
return;
}
// Note: PlexServer from auth service doesn't have mutable status fields
// Status tracking is handled by MultiServerManager
// This method is kept for future extension if we add status to PlexServer model
}
/// Add or update a single server
Future<void> upsertServer(PlexServer server) async {
final servers = await getServers();
-18
View File
@@ -147,22 +147,4 @@ class ShaderService {
Future<void> disable() async {
await applyPreset(ShaderPreset.none);
}
/// Cycle to the next preset in the available list.
Future<ShaderPreset> cyclePreset({List<ShaderPreset>? presets}) async {
presets ??= ShaderPreset.allPresets;
final currentIndex = presets.indexWhere((p) => p.id == _currentPreset.id);
final nextIndex = (currentIndex + 1) % presets.length;
final nextPreset = presets[nextIndex];
await applyPreset(nextPreset);
return nextPreset;
}
/// Reapply current preset (useful after video source changes).
Future<void> reapply() async {
if (_currentPreset.type != ShaderPresetType.none) {
await applyPreset(_currentPreset);
}
}
}