Clean up main a little
This commit is contained in:
@@ -115,7 +115,6 @@ class _ModManagerPageState extends State<ModManagerPage> {
|
|||||||
|
|
||||||
bool _isLoading = false;
|
bool _isLoading = false;
|
||||||
String _statusMessage = '';
|
String _statusMessage = '';
|
||||||
int _totalModsFound = 0;
|
|
||||||
bool _skipFileCount = false;
|
bool _skipFileCount = false;
|
||||||
bool _hasCycles = false;
|
bool _hasCycles = false;
|
||||||
List<String>? _cycleInfo;
|
List<String>? _cycleInfo;
|
||||||
@@ -156,7 +155,6 @@ class _ModManagerPageState extends State<ModManagerPage> {
|
|||||||
_activeMods = modManager.mods.values.where((m) => m.enabled).toList();
|
_activeMods = modManager.mods.values.where((m) => m.enabled).toList();
|
||||||
_isLoading = false;
|
_isLoading = false;
|
||||||
_statusMessage = 'Loaded ${_availableMods.length} mods';
|
_statusMessage = 'Loaded ${_availableMods.length} mods';
|
||||||
_totalModsFound = _availableMods.length;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,7 +339,12 @@ class _ModManagerPageState extends State<ModManagerPage> {
|
|||||||
margin: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
|
margin: const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
|
||||||
padding: const EdgeInsets.all(8.0),
|
padding: const EdgeInsets.all(8.0),
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Colors.red.shade900.withOpacity(0.3),
|
color: Color.fromRGBO(
|
||||||
|
Colors.red.shade900.red,
|
||||||
|
Colors.red.shade900.green,
|
||||||
|
Colors.red.shade900.blue,
|
||||||
|
0.3
|
||||||
|
),
|
||||||
borderRadius: BorderRadius.circular(4.0),
|
borderRadius: BorderRadius.circular(4.0),
|
||||||
border: Border.all(color: Colors.red.shade800),
|
border: Border.all(color: Colors.red.shade800),
|
||||||
),
|
),
|
||||||
@@ -677,9 +680,7 @@ class _ModManagerPageState extends State<ModManagerPage> {
|
|||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color:
|
color:
|
||||||
_searchQuery.isNotEmpty
|
_searchQuery.isNotEmpty
|
||||||
? Colors.blue.withOpacity(
|
? const Color.fromRGBO(0, 0, 255, 0.2)
|
||||||
0.2,
|
|
||||||
)
|
|
||||||
: null,
|
: null,
|
||||||
borderRadius:
|
borderRadius:
|
||||||
BorderRadius.circular(4),
|
BorderRadius.circular(4),
|
||||||
@@ -823,7 +824,6 @@ class _ModManagerPageState extends State<ModManagerPage> {
|
|||||||
if (mounted) {
|
if (mounted) {
|
||||||
setState(() {
|
setState(() {
|
||||||
_statusMessage = 'Loaded mod: ${mod.name}';
|
_statusMessage = 'Loaded mod: ${mod.name}';
|
||||||
_totalModsFound = modManager.mods.length;
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1093,6 +1093,7 @@ class _ModManagerPageState extends State<ModManagerPage> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Show success message
|
// Show success message
|
||||||
|
if (mounted) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text(
|
content: Text(
|
||||||
@@ -1101,6 +1102,7 @@ class _ModManagerPageState extends State<ModManagerPage> {
|
|||||||
backgroundColor: Colors.green,
|
backgroundColor: Colors.green,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
final logger = Logger.instance;
|
final logger = Logger.instance;
|
||||||
logger.error('Error saving mod load order: $e');
|
logger.error('Error saving mod load order: $e');
|
||||||
@@ -1111,6 +1113,7 @@ class _ModManagerPageState extends State<ModManagerPage> {
|
|||||||
});
|
});
|
||||||
|
|
||||||
// Show error message
|
// Show error message
|
||||||
|
if (mounted) {
|
||||||
ScaffoldMessenger.of(context).showSnackBar(
|
ScaffoldMessenger.of(context).showSnackBar(
|
||||||
SnackBar(
|
SnackBar(
|
||||||
content: Text('Error saving mod order: $e'),
|
content: Text('Error saving mod order: $e'),
|
||||||
@@ -1119,6 +1122,7 @@ class _ModManagerPageState extends State<ModManagerPage> {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Load all required dependencies for active mods
|
// Load all required dependencies for active mods
|
||||||
void _loadRequiredDependencies() async {
|
void _loadRequiredDependencies() async {
|
||||||
|
Reference in New Issue
Block a user