~netlandish/links-dev

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH links] Only show save count when it's been saved more than once.

Details
Message ID
<20250617184323.18433-1-peter@netlandish.com>
Sender timestamp
1750164201
DKIM signature
missing
Download raw message
Patch: +6 -4
Changelog-changed: Only show save count when the URL has been publicly
  saved more than once.
---
 models/utils.go | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/models/utils.go b/models/utils.go
index f8d787e..d4a6dfc 100644
--- a/models/utils.go
+++ b/models/utils.go
@@ -88,12 +88,14 @@ func TagsToString(t []Tag) string {
// ShowLinkCounter says whether or not to show a link counter
func ShowLinkCounter(obj any) bool {
	switch v := any(obj).(type) {
	case *BaseURL, BaseURL:
		return true
	case *BaseURL:
		return v.Counter > 1
	case BaseURL:
		return v.Counter > 1
	case *OrgLink:
		return v.BaseURLCounter > 0
		return v.BaseURLCounter > 1
	case OrgLink:
		return v.BaseURLCounter > 0
		return v.BaseURLCounter > 1
	default:
		return false
	}
-- 
2.47.2
Details
Message ID
<DAP18ADUNGUD.DN9XJCD57PKG@netlandish.com>
In-Reply-To
<20250617184323.18433-1-peter@netlandish.com> (view parent)
Sender timestamp
1750164603
DKIM signature
missing
Download raw message
Applied.

To git@git.code.netlandish.com:~netlandish/links
   3aff1c0..e0fbbee  master -> master
Reply to thread Export thread (mbox)