Skip to content

Commit

Permalink
fix notification feed and stop app (#133)
Browse files Browse the repository at this point in the history
* fix notification feed and stop app

* update version
  • Loading branch information
RasmusLindroth authored May 7, 2022
1 parent 88646ae commit 47daa2c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"github.com/rivo/tview"
)

const version = "1.0.0"
const version = "1.0.1"

func main() {
newUser, selectedUser := ui.CliView(version)
Expand Down
2 changes: 2 additions & 0 deletions ui/mainview.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ func mainViewUI(mv *TutView) *tview.Flex {
list.AddItem(feedList(mv), 0, 1, false).
AddItem(notificationList(mv), 0, 1, false)
}
} else if !mv.tut.Config.General.NotificationFeed {
list.AddItem(feedList(mv), 0, 1, false)
}
fc := mv.Timeline.GetFeedContent(showMain)
content := fc.Main
Expand Down
1 change: 1 addition & 0 deletions ui/timeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ func (tl *Timeline) RemoveCurrent(quit bool) {
return
}
if len(tl.Feeds) == 1 && quit {
tl.tutView.tut.App.Stop()
os.Exit(0)
}
tl.Feeds[tl.FeedIndex].Data.Close()
Expand Down
1 change: 1 addition & 0 deletions ui/tutview.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ func (tv *TutView) loggedIn(acc auth.Account) {
me, err := client.GetAccountCurrentUser(context.Background())
if err != nil {
fmt.Printf("Couldn't login. Error %s\n", err)
tv.tut.App.Stop()
os.Exit(1)
}
ac := &api.AccountClient{
Expand Down

0 comments on commit 47daa2c

Please sign in to comment.