From ecf229d3dcd877642661d5d9d74858f16f646552 Mon Sep 17 00:00:00 2001 From: makeworld Date: Wed, 9 Dec 2020 16:00:51 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=B8=20Show=20sub=20popup=20even=20if?= =?UTF-8?q?=20they're=20already=20subbed?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- display/handlers.go | 2 +- subscriptions/subscriptions.go | 5 ----- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/display/handlers.go b/display/handlers.go index 58833f1..750f8be 100644 --- a/display/handlers.go +++ b/display/handlers.go @@ -237,7 +237,7 @@ func handleURL(t *tab, u string, numRedirects int) (string, bool) { t.mode = tabModeDone go func(p *structs.Page) { - if b && t.hasContent() && !subscriptions.IsSubscribed(s) && viper.GetBool("subscriptions.popup") { + if b && t.hasContent() && viper.GetBool("subscriptions.popup") { // The current page might be an untracked feed, and the user wants // to be notified in such cases. diff --git a/subscriptions/subscriptions.go b/subscriptions/subscriptions.go index 1d144f4..76de80f 100644 --- a/subscriptions/subscriptions.go +++ b/subscriptions/subscriptions.go @@ -22,9 +22,6 @@ import ( "github.com/spf13/viper" ) -// TODO: Test for deadlocks and whether there should be more -// goroutines for file writing or other things. - var ( ErrSaving = errors.New("couldn't save JSON to disk") ErrNotSuccess = errors.New("status 20 not returned") @@ -277,8 +274,6 @@ func updatePage(url string) error { // updateAll updates all subscriptions using workers. // It only returns once all the workers are done. func updateAll() { - // TODO: Is two goroutines the right amount? - worker := func(jobs <-chan [2]string, wg *sync.WaitGroup) { // Each job is: [2]string{, "url"} // where is "feed" or "page"