Skip to content

Commit

Permalink
[managerView] Address some concerns
Browse files Browse the repository at this point in the history
  • Loading branch information
lexisother committed Jul 21, 2023
1 parent 68aa9b0 commit 0b46f5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/managerView.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ func (app *UpApplication) ShowManagerView(installed bool, back framework.ButtonB
}

func showInstallScreen(app *UpApplication) {
if _, err := os.Stat(path.Join(app.Config.DiscordPath, "app/plugged.txt")); err == nil {
_, txtErr := os.Stat(path.Join(app.Config.DiscordPath, "app/plugged.txt"))
_, origErr := os.Stat(path.Join(app.Config.DiscordPath, "app.orig.asar"))
if txtErr == nil || origErr == nil {
app.MessageBox("Already installed!", "Replugged is already installed. Please restart your client.", func() {
app.CachedPrimaryView = nil
app.ShowPrimaryView()
Expand Down Expand Up @@ -92,7 +94,7 @@ func showInstallScreen(app *UpApplication) {
pluggedFile, _ := os.Create(path.Join(app.Config.DiscordPath, "app/plugged.txt"))
pluggedFile.WriteString("this file was added to indicate that replugged is installed here.")
app.GSInstant()
app.MessageBox("Install Complete", log, func() {
app.MessageBox(middle.If(errorLog != "Errors:", "Install Failed", "Install Complete"), log, func() {
app.CachedPrimaryView = nil
app.GSLeftwards()
app.ShowPrimaryView()
Expand Down

0 comments on commit 0b46f5f

Please sign in to comment.