func (t *TrayIcon) addNewsFromServer(payload []byte) {
	articles, err := t.getArticlesFromServer(payload)
	if err != nil {
		fmt.Println("Error fetching news:", err)
		if t.Conf.ErrorNotifications {
			t.Icon.ErrorSlot(err)
		}
		return
	}
	for _, a := range articles {
		t.gotNewArticle(a, false)
	}
}
adds news to menu
package tray
import (
	"bytes"
	"encoding/json"
	"fmt"
	"io/ioutil"
	"net/http"
	"runtime"
	"time"
)
type ClientSettings struct {
	MaxItems   int      `json:"MaxItems"`
	Categories []string `json:"Categories"`
}
func (t *TrayIcon) waitForNews() {
	go func() {
		cs := &ClientSettings{
			MaxItems:   t.Conf.MaxArticles,
			Categories: t.Conf.Categories,
		}
		if t.Conf.SetCategoriesFromBranch {
			arch := ""
			if runtime.GOARCH == "arm64" {
				arch = "ARM "
			}
			cs.Categories = append(t.Conf.AddCategoriesBranch, arch+t.Conf.userBranch+" Updates")
		}
		b, _ := json.Marshal(cs)
		if t.Delay {
			<-time.After(time.Duration(t.Conf.DelayAfterStart) * time.Second)
		}
		t.addNewsFromServer(b)
		for {
			<-time.After(time.Duration(t.Conf.RefreshInterval) * time.Second)
			t.addNewsFromServer(b)
		}
	}()
}