Skip to content

Commit

Permalink
patch self(un)following funtionality
Browse files Browse the repository at this point in the history
  • Loading branch information
krustowski committed Jul 22, 2024
1 parent 87a1554 commit 1fe11df
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@
#

APP_NAME=litter-go
APP_VERSION=0.36.1
APP_VERSION=0.36.2
GOLANG_VERSION=1.22
2 changes: 1 addition & 1 deletion api/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"name": "MIT",
"url": "https://github.com/krustowski/litter-go/blob/master/LICENSE"
},
"version": "0.36.1"
"version": "0.36.2"
},
"host": "littr.eu",
"basePath": "/api/v1",
Expand Down
2 changes: 1 addition & 1 deletion pkg/backend/router.go
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// @title litter-go
// @version 0.36.1
// @version 0.36.2
// @description nanoblogging platform as PWA built on go-app framework
// @termsOfService https://littr.eu/tos

Expand Down
6 changes: 5 additions & 1 deletion pkg/frontend/flow.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,10 @@ func (p *FlowPage) Render() app.UI {
func (c *flowContent) onClickFollow(ctx app.Context, e app.Event) {
key := ctx.JSSrc().Get("id").String()

if key == c.user.Nickname {
return
}

flowList := c.user.FlowList

if c.user.ShadeList[key] {
Expand Down Expand Up @@ -1122,7 +1126,7 @@ func (c *flowContent) Render() app.UI {
//app.If(c.users[c.userFlowNick].About != "",
app.Article().Class("max").Style("word-break", "break-word").Style("hyphens", "auto").Text(c.users[c.userFlowNick].About),
//),
app.Button().ID(c.userFlowNick).Class("black border white-text").Style("border-radius", "8px").OnClick(c.onClickFollow).Disabled(c.buttonDisabled).Body(
app.Button().ID(c.userFlowNick).Class("black border white-text").Style("border-radius", "8px").OnClick(c.onClickFollow).Disabled(c.buttonDisabled || c.userFlowNick == c.user.Nickname).Body(
app.If(c.user.FlowList[c.userFlowNick],
app.Span().Text("unfollow"),
).Else(
Expand Down

0 comments on commit 1fe11df

Please sign in to comment.