fix: stop unrelated mod data appearing in Installed Mods screen (#28)

* chore: readme update to include relevant paths

* chore: clarify log message

* fix: stop loading unrelated mod data in Installed Mods screen when no mods are installed
This commit is contained in:
Rob B 2023-07-09 22:22:24 -05:00 committed by GitHub
parent 5188ba2169
commit 15fd3eb497
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 22 additions and 3 deletions

View file

@ -57,10 +57,20 @@ Download the appropriate `.apk` for your CPU architecture.
Download the "all" build [here](https://github.com/Vilsol/ficsit-cli/releases/latest/download/ficsit_darwin_all).
## Usage
### Interactive CLI
To launch the interactive CLI, run the executable without any arguments.
### Command Line
Run `ficsit help` to see a list of available commands.
## Troubleshooting
* Config files are located in `%APPDATA%\ficsit\`
* Cached downloads are located at `%LOCALAPPDATA%\ficsit\downloadCache`
* Profile and installation records are located in `%APPDATA%\ficsit\`
* Downloads are cached in `%LOCALAPPDATA%\ficsit\downloadCache\`
## Development

View file

@ -16,7 +16,7 @@ var cliCmd = &cobra.Command{
log.Info().
Str("version", viper.GetString("version")).
Str("commit", viper.GetString("commit")).
Msg("initialized")
Msg("interactive cli initialized")
global, err := cli.InitCLI(false)
if err != nil {

View file

@ -95,6 +95,15 @@ func (m installedModsList) LoadModData() {
})
go func() {
if len(currentProfile.Mods) == 0 {
m.items <- listUpdate{
Items: items,
Done: true,
}
return
// Continuing past this point would load info about mods we don't have installed
}
references := make([]string, len(currentProfile.Mods))
i := 0
for reference := range currentProfile.Mods {