Skip to content

Commit 0b46f5f

Browse files
committed
[managerView] Address some concerns
1 parent 68aa9b0 commit 0b46f5f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/managerView.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ func (app *UpApplication) ShowManagerView(installed bool, back framework.ButtonB
2525
}
2626

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

0 commit comments

Comments
 (0)