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