shithub: hell

Download patch

ref: 32f4e4ba21ef726320c9e879ebb5fdfd46161c65
parent: 681e9144ffd0e21b04ed640c1ceb30849dd4a9bf
author: penny <penny@limitedideas.org>
date: Thu Sep 25 08:12:13 EDT 2025

fix more bad printing

--- a/main.go
+++ b/main.go
@@ -126,22 +126,20 @@
 				fmt.Printf(hc.page.String())
 				return
 			case "notice":
-				 hc.page = &Page{}
-				 hc.page.loader = &NotificationPages{hc: hc}
-				 fmt.Printf(hc.page.String())
-				 return
-			case "notice2":
+				defer hc.updatePrompt()
+				defer hc.pause(true)
 				notifications, err := hc.GetUnreadNotifications()
 				if len(notifications) > 0 {
 					hc.PrintNotifications(notifications)
 					err = hc.SetNotificationsRead(notifications[len(notifications)-1].ID)
+					return
 				}
+				hc.page = &Page{}
+				hc.page.loader = &NotificationPages{hc: hc}
+				fmt.Println(hc.page.String())
 				if err != nil {
 					fmt.Println(err)
-					return
 				}
-				hc.updatePrompt()
-				hc.pause(true)
 				return
 			case "pause":
 				hc.togglepause()
--- a/notifications.go
+++ b/notifications.go
@@ -65,7 +65,7 @@
 }
 
 func (hc *Hellclient) PrintNotifications(notifications []*mastodon.Notification) {
-	fmt.Print(hc.RenderNotifications(notifications))
+	fmt.Println(hc.RenderNotifications(notifications))
 }
 
 func (hc *Hellclient) RenderNotificationsArray(notifications []*mastodon.Notification) []string {
--