Skip to content

Commit

Permalink
prevent from filtering mods without a pre-selected modpack
Browse files Browse the repository at this point in the history
  • Loading branch information
mrquantumoff committed Jul 22, 2024
1 parent 05e80dd commit f21d90e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dev.mrquantumoff.mcmodpackmanager.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,15 @@
</branding>

<releases>
<release date="2024-08-01" version="24.8.0">
<release date="2024-07-22" version="24.8.0">
<description>
<p>Redesigned mod install page</p>
<p>Small design changes</p>
<p>Added sorting by name and source in search</p>
<p>Added filtering your search by the currently applied modpack.</p>
<p>Added automatically installing mods, when filters are on (experimental)</p>
<p>Avoid losing your old mods folder after applying your first modpack</p>
<p>As a part of the experimental features, you can now install mods without opening thee install mod page, when you have a filter on.</p>
<p>Bug fixes</p>
</description>
</release>
Expand Down
10 changes: 10 additions & 0 deletions lib/pages/web/filter_mods.dart
Original file line number Diff line number Diff line change
Expand Up @@ -197,6 +197,16 @@ class _FilterModsState extends State<FilterMods> {
String api = apiFieldController.value.text;
String modpack = modpackFieldController.value.text;

if (modpack.isEmpty) {
ScaffoldMessenger.of(context).showSnackBar(
SnackBar(
content:
Text(AppLocalizations.of(context)!.chooseModpack),
),
);
return;
}

GetStorage().writeInMemory("lastUsedVersion", version);
GetStorage().writeInMemory("lastUsedAPI", api);
GetStorage().writeInMemory("lastUsedModpack", modpack);
Expand Down

0 comments on commit f21d90e

Please sign in to comment.